Search code examples
javaandroidfile-transferandroid-database

Ways of transferring data between 2 apps?


I am developing an app which by design should accept request from other apps(with some authentication token) and should be able to send requested data(media file or address of media file in local storage). I am not able to do it without switching between apps. Is there a way to do so that i don't know? Thanks in advance.


Solution

  • https://developer.android.com/guide/topics/providers/content-providers

    Content providers can help an application manage access to data stored by itself, stored by other apps, and provide a way to share data with other apps. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface that connects data in one process with code running in another process.

    Without further context on exactly what it is that you are building, this is the general approach you can use to share data between applications.