2017-05-29 104 views
4

我的应用程序流程是这样的:无与伦比的深层链接3

  1. 启动应用
  2. Spotify的“允许应用程序访问页面在浏览器(Chrome)打开,
  3. 的用户给应用程序的权限,并重定向到https://appurl.com/spotify-callback/
  4. 那个URL的深层链接,使我的应用程序现在再次打开,
  5. 深层链接的插件现在应该匹配/spotify-callback/并打开指定的网页SpotifyCallbackPage寿LD被打开,但我得到的错误console.error: Got a deeplink that didn't match

我的深层链接的代码如下所示:

deeplinks.route({ 
       '/spotify-callback/': SpotifyCallbackPage 
      }).subscribe((match) => { 
       // match.$route - the route we matched, which is the matched entry from the arguments to route() 
       // match.$args - the args passed in the link 
       // match.$link - the full link data 
       console.log('Successfully matched route', match); 
      }, (nomatch) => { 
       // nomatch.$link - the full link data 
       console.error('Got a deeplink that didn\'t match'); 
       console.log(nomatch); 
      }); 

发送到路由器的网址是:

https://appurl.com/spotify-callback/#access_token=random-access-token-here&token_type=Bearer&expires_in=3600 

完整的错误消息:

error opening ws message: {"category":"console","type":"log","data":["On deep 
      link",{"url":"https://appurl.com/spotify-callback/#access_token=random-access-token-here&token_type=Bearer&expires_in=3600","path":"/spotify-callback/","scheme":"https","host":"appurl.com","fragment":"access_token=random-access-token-here&token_type=Bearer&expires_in=3600","extra":{"org.chromium.chrome.browser.eenp":["io.ionic.starter"],"org.chromium.chrome.browser.referrer_id":21,"com.android.browser.application_id":"com.android.chrome"}}]} 
[16:28:02] console.error: Got a deeplink that didn't match 

我试过不同的网址d端点在路由器中,但它们都不匹配。有人知道我应该尝试匹配吗?

+1

我似乎有同样的问题,你有没有设法解决这个问题? https://stackoverflow.com/questions/44238121/why-android-does-not-handle-a-deeplink-url-which-has-in-the-path也可能很有趣。 –

回答

0

我不确定您是否已经找到解决此问题的方法。也许你可以尝试改变route url(Spotify的回调)喜欢的东西:

spotify-callback + window.location.hash