0

This is a question that I've not been able to fetch from StackOverflow or directly from Google. Is it maybe because I didn't search with the right words?

Well, anyway:

I'm trying to check if an app is a game by its packageName.

What I've researched:

  1. I know the app could be checked if it comes from the Play Store, but what about if it comes from any store?
  2. Inside the PackageInfo, there's the feature PackageManager.FEATURE_GAMEPAD but what about if it doesn't have any GAMEPAD or anything related? just a game of... puzzle for example?.
  3. I know that from API >= 21 you can really check it, but what about the older ones?

Thank you very much in advance.

Regards.

Rafael.

Community
  • 1
  • 1
Rafael Ruiz Muñoz
  • 5,333
  • 6
  • 46
  • 92

2 Answers2

4

I'm trying to check if an app is a game by its packageName.

By definition, that is impossible. For example, there is no universal definition of what a "game" is.

I know that from API >= 21 you can really check it

No, you can't, as there is no requirement for a game to have that flag set.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
0

Check the app category in play store Just parse the page of the play store for that package and get the category it is in. Games have a very distinctive category

Rami Dabain
  • 4,709
  • 12
  • 62
  • 106