I have what I feel may be silly questions but I can't find a good reference anywhere. I'm making an SDK to be used by Android. In the SDK I'm exposing server endpoints and also doing some behind the scenes UDP broadcast listening. The SDK will be consumed by Java but written in Kotlin. Few questions:
1. In general, should libraries and SDKs be doing behind-the-scenes threading? For instance, I'd like my SDK to start listening for UDP events on a background thread on init. Should the multi-threading be handled explitcitly be the client of the code?
2. If I were to do multiple threads behind the scenes, Is there any way to run code in a coroutine/thread and then have the results post to the main thread without coupling the SDK with Android (requiring context)?
3. If an SDK were to offer an asynchronous API using callbacks for Java consumption and Flow for Kotlin, what is a clean way to dynamically include bindings for one or the other based on dependencies pulled in? (e.g. `implementation("mySDK-core") and implementation("mySDK-ktx")?
Any docs or references on SDK or library design in general would be greatly apprecaited. Thanks in advance!