I'm looking to send a user to install an app from the Play Store, then once they click the install button I want to send them back to my app and show a progress bar and helpful info.
There is an app called Mistplay that does this. I know they detect the app installation, but I'm not sure if they are faking the app Install progress or not.
Any suggestions on this? I'm able to use intents to launch the play store market but I don't know how to detect the user clicking install in Play Store and sending the user back to my app or any of the steps past that.
Edit 1:
So I am able to detect when the installation finishes by including the target app in my Manifest Queries section + having this code (overly verbose for testing) in my main activity onCreate() + onDestroy unregister.
val filter = IntentFilter()
filter.addAction(Intent.ACTION_PACKAGE_ADDED)
filter.addAction(Intent.ACTION_PACKAGE_CHANGED)
filter.addAction(Intent.ACTION_PACKAGE_DATA_CLEARED)
filter.addAction(Intent.ACTION_PACKAGE_REMOVED)
filter.addAction(Intent.ACTION_PACKAGE_REPLACED)
filter.addAction(Intent.ACTION_PACKAGE_RESTARTED)
filter.addDataScheme("package")
registerReceiver(appInstallBroadcastReceiver, filter)
from Android: How to Send user to Install an App on Google Play Store and then Detect Install Start and progress
No comments:
Post a Comment