SKP*_*SKP 4 browser authentication android oauth fitbit
我已将 Fitbit 与我的 Android 应用程序集成。我在使用 Chrome 浏览器连接 Fitbit 时没有遇到任何挑战,但当我尝试将其连接到 Firefox 或默认互联网浏览器时,它不起作用。
以下是我正在使用的意图过滤器:
<activity
android:name=".MyActivity"
android:launchMode="singleTop"
android:resizeableActivity="false"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar">
<!-- FitBit intent filter to get call back data for Authentication API -->
<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="myfitbit"/>
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)
请建议。
我想通了这个问题。
我曾经使用过android:launchMode="singleTop" ,它阻止我的应用程序接收onNewIntent()我的收件人活动的 oAuth 令牌。但只有当我尝试使用 Chrome 以外的任何浏览器连接到 Fitbit 时,才会发生这种情况。最后,我将启动模式更改为android:launchMode="singleTask"
有关更多详细信息,请访问/sf/answers/2585952981/答案。
| 归档时间: |
|
| 查看次数: |
167 次 |
| 最近记录: |