Issue
I have used Intent-filter PACKAGE_NAME to capture the package name of the newly installed app from Playstore or by adb command.Can anyone suggest me how to differentiate between package installation from playstore and from adb.
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
This will work both for adb installation and installation from playstore. I need it to be specific to playstore.
Solution
You can use packageManager.getInstallerPackageName
And com.android.vending
is the package of Play Store
Answered By - tadev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.