# library-development


03/23/2022, 10:01 AM
Hi, I hope this is the right channel to ask this: I am building a sdk for use by our customers. They will embed the sdk in their apps. The sdk takes a picture and then sends to our backend for analysis and returns a result. My questions are: 1. best way to hand control to the sdk. I am currently having the host app start an activity. Other options are StartActivityForResult and the new version of it. Another is a global singleton object initialised by the host and methods called on it. 2. how to distribute the sdk without supplying source code?


03/23/2022, 10:51 AM
For 1. you'll most likely have more answers in #android. If I had to do it, I would expose 2 APIs: • a low-level API that takes a Bitmap or an in-memory picture that doesn't require starting a new Activity • a high-level API that starts your own activity. In that case, make sure to document the intent required to start the result and what data is available in
For 2. it's a bit counter intuitive but I think you can distribute through mavenCentral. Just make sure to upload empty javadoc and sources artifacts
🙌 1