安卓preInstall检测 [英] Android PreInstall detection

查看:607
本文介绍了安卓preInstall检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Andr​​oid应用程序将是preinstalled。我想保留preinstalled应用程序跟踪。

My android application will be preinstalled. And I want to keep tracking of preinstalled apps.

为此,我需要以某种方式保存密钥或标记(这意味着应用程序是preinstalled)。我将把这个关键的每个请求我的后端,并对其进行分析。 我有一个问题这一点。一个问题是有关的从谷歌更新播放的。

For this purpose I need somehow to save a key or a flag (which means that app is preinstalled). I will add this key to each request to my back-end and will analyze it. I have an issue with that. An issue is about update from Google Play.

在非标准的工作流程是这样的:

The standart workflow is the following:

1)我给制造商一个特别版本我的应用程序,这在某种程度上节约了密钥(共享preFS为例)的。

1) I give to a manufacturer a special version of my application, which saves a key somehow (in Shared Prefs for example).

2)与该应用制造商出售装置(特殊的,修改的)。

2) Manufacturer sell device with the app (special, modified).

3)当用户得到它,有definetly是下一个版本的应用程序(非标准的,没有特别的code)在谷歌播放,因此没有任何下水(最坏的情况下)的用户可能对其进行更新。

3) When User get it, there definetly be next version of the app (standart, without special code) in the Google Play, so user perhaps update it without any launching (the worst case).

4)我失去了我的跟踪可能性。 (新APK,完全去除从未发起的旧这是特殊的)

4) I lost my tracking possibility. (new apk fully removing never launched old one which was special)

要解决它,我是听一个系统广播ON_BOOT_COMPLETE,但它的<一个href="http://stackoverflow.com/questions/9682660/boot-completed-not-called-on-honeycomb-after-export">not在Android 3.1+ 的正常工作。

To solve it I was listening a system broadcast ON_BOOT_COMPLETE, but its not working properly on Android 3.1+.

你有什么想法我该怎么办呢?

Have you any ideas how can I do that?

推荐答案

你能安装一个额外的apk,只有有一个服务?然后,该服务可以有钥匙等,它可以监听,当你的应用程序启动和发送的跟踪信息。然后,如果你的应用程序得到升级也没什么关系;该服务将仍然是相同的。

Can you install an additional .apk that only has a service? Then that service can have the key, etc. and it can listen for when your app starts and send the tracking info. Then it won't matter if your app gets upgraded; the service will still be the same.

这篇关于安卓preInstall检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆