C2H*_*H6O 6 android google-chrome oauth chrome-custom-tabs
我似乎无法弄清楚如何拦截我使用Fitbit OAuth 2.0的redirect_uri.
这是我为我的一个活动定义的intent-filter:
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="track" android:host="fitbit"/>
</intent-filter>
Run Code Online (Sandbox Code Playgroud)
在使用自定义Chrome标签登录并授权用户后,我被重定向到track:// fitbit URI,我想拦截并将该意图发送到我的Activity,但redirect_uri已加载到标签中,显示"ERR_UKNOWN_URL_SCHEME"错误.
编辑#1:
在https://code.google.com/p/chromium/issues/detail?id=536037上发现了类似的讨论 .我清除了Chrome的默认值,但是该选项卡的redirect_uri似乎没有触发一个Intent,询问哪个应用程序打开了URI.