My play store account has over 100 apps published and all of them have this common user generation process which includes OTP verification. Interesting to note is all the apps have same user object with same properties for a particular OTP verified number, which gets stored in the respective SharedPreferences
as string.
For better User Experience I would like to trim down the user generation process if there is any one app installed in the device and has done OTP verification. I want to share this user object, which is saved as string in each app's SharedPreferences
.
So here's what I want when I install com.domain.app.cX app:
1) com.domain.app.cX -> (Do you have a verified user?) -> com.domain.app.cY
2.1) com.domain.app.cY -> (Yes I have, here is it "user json") -> com.domain.app.cX
or
2.2) com.domain.app.cY -> (No I don't have any user) -> com.domain.app.cX
3) Move to check if com.domain.app.cZ is installed and do over from step 1
Options I have:
1) I have read about ContentProvider
and understood that you need to put in a URI of ContentProvider
which is package name specific.
2) Use package name with createPackageContext
and get SharedPreferences
for any app.
In both the solutions I don't know which app is already installed on device and hence URIs of all ContentProvider
and package name of the app.
Is there any solution in which I can leverage the signature of the app, since all the app are signed with same certificate.