Google Play商店正在将引荐来源数据更改为“com.android.chrome”? [英] Google play store is changing the referrer data to "com.android.chrome"?

查看:134
本文介绍了Google Play商店正在将引荐来源数据更改为“com.android.chrome”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了一段代码,其意图是让google playstore将引用数据作为广播发送到我的应用程序安装后我就抓到并处理好了。问题是我要求谷歌回火的数据与谷歌实际发送给我的数据不同。



我使用以下代码创建链接:

p>

  final String url =intent:// details?id = com.myapp& url =a dummy url& referrer = +引荐+ #意图;方案=市场;行动= android.intent.action.VIEW;包= com.myapp; S.referrer = +引荐+;结束; 

这里referrer =<正确的 base64 编码的字符串>



注意:网址对我没有任何用处。我的兴趣是回退到谷歌安装应用程序。这里的假设是,我没有安装应用程序的设备,因此这应该工作。回退正常发生,并且我从我安装应用程序的位置导向Google PlayStore,然后将引荐来源数据广播到我的应用程序。我找到了推荐人数据,并在生产版本的烤面包片中显示。

我期望在烤面包数据中看到:< / p>我的 base64 编码我发送了>

我看到的是:com.android.chrome

为什么会发生这种情况?

解决方案

花费太多时间后。我能够弄清楚发生了什么。如果没有推荐人给chrome附加自己的引用,其值为com.android.chrome。
我附加引用链接的方式是错误的,因此chrome的默认引用链接被引用。
更正在最后一部分

改变这个

...; package = com .myapp; S.referrer =+ referrer +; end;



...; package = com.myapp& referrer =+ referrer +; end;

希望这有助于其他人。我整天都在这里度过。

I am new to referrer concept.

I have written a code, the intention of which is to have google playstore send a referrer data as a broadcast to my app after installation which I catch and handle accordingly. The problem is the data that I am asking google to fireback is different from what google is actually sending to me.

I use the following code to create the link:

final String url = "intent://details?id=com.myapp&url="a dummy url"&referrer="+referrer+"#Intent;scheme=market;action=android.intent.action.VIEW;package=com.myapp;S.referrer="+referrer+";end";

Here referrer = < a correct base64 encoded string >

NOTE:
The initial dummy URL is not of any use to me. My interest is to fallback to google to install the app. The assumption here is that I don't have the app installed on device, hence this should work. The fallback is happening correctly and I am directed to Google PlayStore from where I install the app then the referrer data is broadcast to my app. I catch the referrer data and show it in a toast in the production build.

What I expect to see in the toast data: < my base64 encoded which i sent >
What I see: "com.android.chrome"

Why is this happening?

解决方案

After spending too much of time . I was able to figure out what was happening. If there are no referrers given chrome attaches its own referrer whose value is "com.android.chrome". The way I was attaching the referrer was wrong , hence chrome's default referrer was picked up. The correction is in the last part

change this

...;package=com.myapp;S.referrer="+referrer+";end";

to

...;package=com.myapp&referrer="+referrer+";end";

Hope this helps others. My whole day was spent in this.

这篇关于Google Play商店正在将引荐来源数据更改为“com.android.chrome”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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