I have an Android app (Kotlin) that performs video transcoding work (via android.media.*).
I am looking to expose some of this behavior through a cloud-hosted web service, so that non-Android clients can also consume it. For example, the web service would receive a URL to a video that needs transcoding work, and would return the URL of the transcoded file.
Because the shared code is heavy on android.* dependencies, Kotlin Multiplatform does not appear to be an option for me.
An approach I am considering is:
- Extract the shared code to an Android library
- Create some kind of target that would allow invoking the shared code from CLI
- Deploy a Docker container, with something like Anbox to emulate Android APIs
Does this approach seem sensible? Are there better options or examples for accomplishing something similar?