不要让Android Market的INSTALL_REFERRER在Android 3.X [英] Don't get Android Market INSTALL_REFERRER on Android 3.x

查看:172
本文介绍了不要让Android Market的INSTALL_REFERRER在Android 3.X的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实现一个BroadcastReceiver为Android市场INSTALL_REFERRER作为意向
这里描述:

I implemented a BroadcastReceiver for the Android Market INSTALL_REFERRER Intent as described here:

<一个href=\"http://stackoverflow.com/questions/4093150/get-referrer-after-installing-app-from-android-market\">Get从Android Market安装应用

它工作正常的Andr​​oid设备早于3.0,但它似乎从来没有开枪蜂窝设备。我在安装和应用首次启动后检查logcat的输出,我没有看到我的任何调试输出这使我相信,广播接收器没有运行(我见$ P $输出对蜂窝版本)。

It works fine for android devices earlier than 3.0 but it never seems to fire on Honeycomb devices. I've checked the logcat output during the install and after the app's first launch and I don't see any of my debug output which leads me to believe that the BroadcastReceiver isn't being run (I do see the output on pre-Honeycomb versions).

任何人都可以在那里证实这个问题?

Can anyone out there confirm this problem?

不知道如何使它工作?

推荐答案

有一个叫新的标志<一个href=\"http://developer.android.com/reference/android/content/Intent.html#FLAG_EXCLUDE_STOPPED_PACKAGES\"相对=nofollow> FLAG_EXCLUDE_STOPPED_PACKAGES 3.1:

There's a new flag called FLAG_EXCLUDE_STOPPED_PACKAGES in 3.1:

如果设置了此意图不匹配当前已停止在包中的所有组件。如果没有设置,则默认行为是包含在结果这样的应用程序。

If set, this intent will not match any components in packages that are currently stopped. If this is not set, then the default behavior is to include such applications in the result.

发行说明3.1

请注意,该系统增加了FLAG_EXCLUDE_STOPPED_PACKAGES到所有的广播意图。

Note that the system adds FLAG_EXCLUDE_STOPPED_PACKAGES to all broadcast intents.

和也:

应用程序是,当他们第一次安装停止状态,但尚未发布,当他们由用户手动停止(在管理应用程序)。

Applications are in a stopped state when they are first installed but are not yet launched and when they are manually stopped by the user (in Manage Applications).

看起来这是打破 INSTALL_REFERRER 的行为3.1+设备为您的应用程序尚未启动,因此无法接收广播。可悲的是,我不知道有什么方法,使这项工作。谷歌可能会做一些自己的市场应用来解决这个问题(单程将只使用<一个href=\"http://developer.android.com/reference/android/content/Intent.html#FLAG_INCLUDE_STOPPED_PACKAGES\"相对=nofollow> FLAG_INCLUDE_STOPPED_PACKAGES 虽然我不知道这将是一个伟大的想法,因为这些新推出的控制整点)。

Seems like this is breaking the behavior of INSTALL_REFERRER in 3.1+ devices as your app has not yet been launched and so can not receive the broadcast. Sadly I don't know of any way to make this work. Google could probably do something to fix this in their Market app (one way would be to just use FLAG_INCLUDE_STOPPED_PACKAGES though I'm not sure that would be a great idea, given the whole point of these new launch controls).

这篇关于不要让Android Market的INSTALL_REFERRER在Android 3.X的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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