I have a couple of app stores installed on my Android device, like Play Store
(default), Amazon App Store
, Aptoide
, etc. Can someone tell me the intent that is needed to display the list of all those app stores?
When the user clicks on a link I want him to give the option to select the app store through which the app is to be downloaded. I am unable to find the intent action that would help me do this.
Asked
Active
Viewed 120 times
1

Antrromet
- 15,294
- 10
- 60
- 75
-
http://stackoverflow.com/a/11753070 – Sree Apr 07 '14 at 05:21
-
1@Sreekanthss The solution in the link that you posted above, you need to know the package name and I am afraid it will directly launch the play store. My requirement is that I don't have the package name, I just need to display the app store list. – Antrromet Apr 07 '14 at 05:24
-
yes i understand your req from question itself i am giving a hint of intent action only, i feel it is not a easy job to find the app stores in a device – Sree Apr 07 '14 at 05:30
1 Answers
0
I finally found the answer to my own question. I used the following piece of code to display the app stores installed on the device.
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?"));
List<ResolveInfo> resInfo = getPackageManager().queryIntentActivities(intent, 0);
if (!resInfo.isEmpty()){
ArrayList<String> storePacakgeNames = new ArrayList<String>();
for (ResolveInfo resolveInfo : resInfo) {
storePacakgeNames.add(resolveInfo.activityInfo.packageName);
}
}

Antrromet
- 15,294
- 10
- 60
- 75