Search code examples
androidapk

How to expose API in one Android Application to another


I would like to write an application that would run on the Android device as a service and then with other application(s) I would access to this service with calls. Is there a way to expose public API from an application/service on the Android device? And how to access this API from another application?

Thanks for help


Solution

  • Look into Intents, AIDL (binder) and content providers.

    Intents are smal "simple" asyncronius messages, AIDL if for a more RPC type of API, usefull for a more complex/more data API. Content providers are a way to expose data from your App, like a contact list or something.