-1

Is there any way to get list of all games installed in an android device programmatically using java?

Thanks in advance.

Sekretoz
  • 112
  • 6
  • possible duplicate of [How to programatically get the installed game list in android](http://stackoverflow.com/questions/13668443/how-to-programatically-get-the-installed-game-list-in-android) – Soham Jul 20 '15 at 06:00
  • is there any way to get list of android games package name? – Sekretoz Jul 20 '15 at 06:04
  • No there is no way,check the ink above it's the best solution – Soham Jul 20 '15 at 06:06
  • no what i mean is how to get list of games package name from the play store? – Sekretoz Jul 20 '15 at 06:07

2 Answers2

0
Try this code


final PackageManager pm = getPackageManager();
 //get a list of installed apps.
List<ApplicationInfo> packages =  pm.getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo packageInfo : packages) {
Log.d(TAG, "Installed package :" + packageInfo.packageName);
Log.d(TAG, "Source dir : " + packageInfo.sourceDir);
Log.d(TAG, "Launch Activity :" + pm.getLaunchIntentForPackage(packageInfo.packageName)); 
} 
sasikumar
  • 11,797
  • 2
  • 26
  • 44
  • 1
    will i determine if the application is a game using your code? – Sekretoz Jul 20 '15 at 05:54
  • your code will just give me a list of all installed application.but i think it will not give me the list of all games only. – Sekretoz Jul 20 '15 at 05:55
  • There is no way to set your app as "Game Type" in Android, so you could not filter apps by category. I think, best solution - to parse all games packages (game name could be different because of phone localization) from Google Play and put that list in app and sometimes update it from your server. If you always got internet connection in your application you could send found apps list to server and server will return back games from that list. So, you need to write server code for that. – sasikumar Jul 20 '15 at 05:56
  • how will i get the list of all games package name from the google play store? – Sekretoz Jul 20 '15 at 06:00
0

Hit the url

https://play.google.com/store/apps/details?id=your.package.name

From the source you will get something like

<span itemprop="genre">Shopping</span> 

Or you can use marketer-api.

Soham
  • 4,259
  • 10
  • 41
  • 68