How to detect if an android app is a game?

前端 未结 3 1640
遇见更好的自我
遇见更好的自我 2020-12-11 09:54

In an app I am developing I need to iterate through the installed apps and detect which ones are games. Is there any way to do this?

I was thinking to a Play Store

3条回答
  •  佛祖请我去吃肉
    2020-12-11 10:35

    There is no automatical way to detect if an app is a game. You just could compaire the package name of the common part of the package name. My solution was to index the google store pages and hash the package names.

    I could optimize my hashes by building common prefixes. I handled the package name as a domain and grep the public suffix. I use the list from http://publicsuffix.org/.

    A "public suffix" is one under which Internet users can directly register names. Some examples of public suffixes are .com, .co.uk and pvt.k12.ma.us. The Public Suffix List is a list of all known public suffixes.

    The Public Suffix List is an initiative of Mozilla, but is maintained as a community resource. It is available for use in any software, but was originally created to meet the needs of browser manufacturers.

    With this list you can detect part of a packagename is a common prefix.

提交回复
热议问题