Home  >  Q&A  >  body text

Android代码,如何实现将本机已安装的应用进行分类,例如列出游戏类,工具类

Android代码,如何实现将本机已安装的应用进行分类,例如列出游戏类,工具类

请教各位,能否提供思路,或已有过类似开发,提供下具体实现方式。

目前已经想到:

①列出所有包名和应用名
②上传至服务器,服务器通过应用名到各大安卓市场进行模拟请求。返回相应类目


但是想到这样子效率很低,如果APP很多,速度会非常慢,匹配也很难做到100%精确。

PS:正在开发的一款工具软件,是面向国外市场。很多应用国内市场的分发渠道没有,只能通过google play 或者其他国外第三方应用分发平台。

PHP中文网PHP中文网2762 days ago540

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 18:01:41

    Hi Hello, I think it is not difficult to implement this thing on the Android side, but the difficulty lies on the server side.

    Android client working

    The work that Android has to do is nothing more than collecting the information of the installed App on the device and uploading it to the server, and then the server returns the detailed information of the App (as for how to make the server return information more efficiently, we will talk about it later), and then displays the information. .

    Server-side work

    If the server only starts to query the major markets for detailed information through the application name and package name after receiving the client's request, the efficiency will be quite low. The best way is to get a crawler to crawl the major markets from time to time, in advance. Cache certain data so that you can basically respond to client requests in real time. I don’t know if you know about some App price reduction monitoring products. They basically have the same idea. The key point is how to implement this crawler algorithm. We must take into account the load of the server, the anti-crawler strategy of the target server, and the effective time of cached data. There will definitely be different strategies based on the popularity of the application, right? So I feel that developing this algorithm is the top priority of the entire project.

    Some applications may have the same application name but inconsistent package names. For example, one package name is used in the domestic market, but another package name is sent to Google Play. Please pay attention to this.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 18:01:41

    The idea I can think of is to get the application package name and upload it to the backend server for analysis. After all, the application itself does not have any information to record the category it belongs to.

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 18:01:41

    The answers above are all very good, you can learn from them, and your own thinking is also correct. My answer is similar. As far as the application itself is concerned, there are currently no identifying attributes such as "game", "news", "social", etc. They are all the same application, and those attributes are classified into categories. Therefore, to achieve what you said Things have to rely on "people", specifically the artificial collection of application big data (such as application package names). This part can be crawled by crawlers to crawl applications in major application stores. There are only a few mainstream large-scale application stores, and most applications The same package name is maintained in different stores. Then classify the data (into so-called games, social networking, etc.), it is simple to say, but doesn’t it feel like things are already huge? Is it almost the same as being an app store? I feel it's really big. Preliminary data preparation is very important. You must have enough data to ensure that the reported applications can be matched to the corresponding classification in the backend. As for the client, it cannot do such complicated work. The client only scans and reports the applications on the mobile phone and receives classification feedback from the backend. But there is also a problem. Newly released applications cannot always be classified (or you can accept an unclassified one). That's all I can think of for now.

    reply
    0
  • Cancelreply