简体   繁体   English

Android Play商店市场://链接不再有效?

[英]Android Play Store market:// link is no longer working?

I've been redirecting my users for the past year from my domain: 我一直在从我的域名重定向过去一年的用户:

http://example.com/get http://example.com/get

to: market://details?id=com.example.myapp to:market:// details?id = com.example.myapp

Today I've check this on Nexus 5/LG G3/OnePlus One from the chrome browser app and it stopped working! 今天我在Chrome浏览器应用程序的Nexus 5 / LG G3 / OnePlus One上查看了它,它停止了工作!

Now, when my users try to download the app they are redirected to a broken link. 现在,当我的用户尝试下载应用时,他们会被重定向到断开的链接。

Anyone know anything about this change in the Chrome app in Android? 任何人都知道Android中的Chrome应用中有关此更改的任何信息?

from reading the chrome's version 40 release, there are some insight id like to share http://blog.chromium.org/2014/12/chrome-40-beta-powerful-offline-and.html 从阅读chrome的40版本开始,有一些洞察力的人喜欢分享http://blog.chromium.org/2014/12/chrome-40-beta-powerful-offline-and.html

they updated to Content Security Policy Level 2, which has a stronger control over redirects. 他们更新了内容安全策略级别2,它可以更好地控制重定向。 https://w3c.github.io/webappsec/specs/content-security-policy/#changes-from-level-1 https://w3c.github.io/webappsec/specs/content-security-policy/#changes-from-level-1

  1. The path component of a source expression is now ignored if the resource being loaded is the result of a redirect, as described in §4.2.2.3 Paths and Redirects. 如果正在加载的资源是重定向的结果,则现在将忽略源表达式的路径组件,如第4.2.2.3节“路径和重定向”中所述。

  2. Redirects are blocked by default, and explicitly allowed with a new unsafe-redirect expression. 默认情况下会禁止重定向,并使用新的unsafe-redirect表达式明确允许重定向。

So I did some testing. 所以我做了一些测试。 if your initial action started from redirect (no matter window.location or http 302) it will show an error. 如果您的初始操作是从重定向开始的(无论是window.location还是http 302),它将显示错误。 but once i created a hyperlink to market:// and explicitly clicked it, it worked fine. 但是,一旦我创建了一个到市场的超链接://并明确点击它,它工作正常。

for now i ended up creating a webpage in between, where i ask the user to click the link to proceed. 现在我最终在两者之间创建了一个网页,我要求用户点击链接继续。

I was testing this url on different devices with different OS/Play Store/ Play Services/ Browsers. 我正在使用不同的OS / Play商店/播放服务/浏览器在不同设备上测试此URL。 looks like it's related to browser but not OS or Play Services. 看起来它与浏览器有关,但与操作系统或播放服务无关。

Initially I updated Play Services and Google Play Store and my old Chrome (v18) was opening market://details?id= url fine. 最初我更新了Play服务和Google Play商店,我的旧Chrome(第18版)正在开放market://details?id= url罚款。

Afterward I had updated my Chrome ( v18 ) to version 40 . 后来我更新了我的Chrome(V18)40版。 And it's not working any more. 而且它不再起作用了。

Meanwhile, FireFox and default "Browsers" still opens this url and redirects to Google Play Store app. 同时,FireFox和默认的“浏览器”仍会打开此网址并重定向到Google Play商店应用。

PS I have registered issue in Chromium bug tracker. PS我在Chromium bug tracker中注册了问题。 Let's see if there will be any response: https://code.google.com/p/chromium/issues/detail?can=2&q=market&colspec=ID%20Pri%20M%20Week%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified&id=454396&thanks=454396&ts=1422888121 让我们看看是否会有任何回复: https//code.google.com/p/chromium/issues/detail?can = 2&q = market&solpec = ID%20Pri%20M%20Week%20ReleaseBlock%20Cr%20Status%20Owner%20Summary %20OS%20Modified&ID = 454396&感谢= 454396& TS = 1422888121

UPDATE [6.05.15] : Unfortunately, they decided not to fix this issue, saying, that it's planned behaviour. 更新 [6.05.15]:不幸的是,他们决定不解决这个问题,并说,这是计划行为。 As they said, user should click the link by himself. 正如他们所说,用户应该自己点击链接。 Only then re-direct to the app on devices is allowed. 只有这样才允许在设备上重定向到应用程序。

So, there is only one "work-around", that I see for now: create a page, that contains text like "Click link below to go to the app" , followed by link like: 所以,我现在只看到一个“解决方法”:创建一个页面,其中包含“点击下面的链接转到应用程序”等文本,然后链接如下:

<a href="market://details?id=com.example.myapp"> Load Example App </a>

or 要么

<a href="intent://foo.bar#Intent;scheme=blabla;package=com.example.myapp;end" > Load App/ Activate your Profile </a>

请尝试以下链接,将您的.app.id替换为您自己的标识符:

https://play.app.goo.gl/?link=https://play.google.com/store/apps/details?id=your.app.id&ddl=1&pcampaignid=web_ddl_1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM