How can I avoid making users download a separate APK for account management?

227 Views Asked by At

I have created a custom account type for two applications that I am developing. Now I am looking for a way for both apps to take advantage of this single account service. The documentation recommends the following.

One solution is to place the service in one small, special-purpose APK. When an app wishes to use your custom account type, it can check the device to see if your custom account service is available. If not, it can direct the user to Google Play to download the service. This may seem like a great deal of trouble at first, but compared with the alternative of re-entering credentials for every app that uses your custom account, it's refreshingly easy.

But I do not want to make my users download a separate APK just to be able to log in. What would be another solution that would allow both apps to have this functionality, without the burden of a separate APK?

1

There are 1 best solutions below

1
Lokesh On

Try Content Providers So your on app can read data of other app official link

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. Implementing a content provider has many advantages. Most importantly you can configure a content provider to allow other applications to securely access and modify your app data

There so many example and tutorial available on web. You need some research on this this is best way to communicate between two app. by using this you can get user details of another app.

let me know if you any other query.