android - Share user's information with other apps with same signature -


my play store account has on 100 apps published , of them have common user generation process includes otp verification. interesting note apps have same user object same properties particular otp verified number, gets stored in respective sharedpreferences string.

for better user experience trim down user generation process if there 1 app installed in device , has done otp verification. want share user object, saved string in each app's sharedpreferences.

so here's want when install com.domain.app.cx app:

1) com.domain.app.cx -> (do have verified user?) -> com.domain.app.cy

2.1) com.domain.app.cy -> (yes have, here "user json") -> com.domain.app.cx

or

2.2) com.domain.app.cy -> (no don't have user) -> com.domain.app.cx

3) move check if com.domain.app.cz installed , on step 1

options have:

1) have read contentprovider , understood need put in uri of contentprovider package name specific.

2) use package name createpackagecontext , sharedpreferences app.

in both solutions don't know app installed on device , hence uris of contentprovider , package name of app.

is there solution in can leverage signature of app, since app signed same certificate.

using broadcast receivers , custom broadcasts. redundant common data across apps shared preferences.

all apps contain pair of broadcast receiver , sender. app wants verification status send broadcast. other apps listen broadcast receive , add verification status in intent , send again broadcast. 1st app send broadcast verification status receive latest status , update ui accordingly. if default value false show verification screen.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -