【问题标题】:Google Play not passing full referrer string?Google Play 没有传递完整的引用字符串?
【发布时间】:2013-04-26 00:49:49
【问题描述】:

为什么我在我的 INSTALL_REFERRER BroadcastReceiver 中只能看到我的引荐来源字符串的一部分?

LogCat 显示:

START u0 {act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=market://details?id=com.myapp&referrer=val1=1&val2=2

但是当我根据意图在我的 BroadcastReceiver 中记录“referrer”值时,我只得到:

val1=1

【问题讨论】:

    标签: android google-play


    【解决方案1】:

    对于下面的 URL market://details?id=com.myapp&referrer=val1=1&val2=2,变量会这样拆分:

    • referrer = val1=1
    • val2 = 2

    要让引荐来源网址包含val1=1&val2=2,您需要转义&。 URL 看起来像

    market://details?id=com.myapp&referrer=val1=1%26val2=2

    【讨论】:

    • 这对我的 2.x 设备来说很好,但在 4.x 上,当我访问 market://details?id=com.myapp&referrer=val1=1%26val2=2 时,意图显示未编码推荐人。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-14
    • 2012-11-28
    • 2012-07-21
    相关资源
    最近更新 更多