通过 packageName 检查 Android 应用是否为游戏

Check if Android app is a game by packageName

这是一个我无法从 Whosebug 或直接从 Google 获取的问题。是不是我搜索的词不对?

嗯,总之:

我正在尝试通过 packageName.

来检查应用是否为游戏

我研究的内容:

  1. I know the app could be checked if it comes from the Play Store,但是如果它来自 任何 商店呢?
  2. Inside the PackageInfo, there's the feature PackageManager.FEATURE_GAMEPAD 但是如果它没有任何 GAMEPAD 或任何相关的东西呢?只是一个...拼图游戏?
  3. I know that from API >= 21 you can really check it,但是年纪大的呢?

非常感谢您。

此致。

拉斐尔.

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

根据定义,这是不可能的。例如,"game" 是什么没有统一的定义。

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

不,你不能,因为游戏不需要设置该标志。

查看 Play 商店中的应用类别 只需解析该包的 Play 商店页面并获取它所在的类别。游戏有一个非常独特的类别