【问题标题】:FitBit oAuth issue with Firefox or Internet browserFirefox 或 Internet 浏览器的 FitBit oAuth 问题
【发布时间】:2018-01-20 10:06:30
【问题描述】:

我已将 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>

请提出建议。

【问题讨论】:

    标签: android authentication browser oauth fitbit


    【解决方案1】:

    我发现了问题。

    我使用了android:launchMode="singleTop",这阻止了我的应用在我的收件人活动的onNewIntent() 上接收oAuth 令牌。但这种情况只有在我尝试使用 Chrome 以外的任何浏览器连接到 Fitbit 时才会发生。最后我把launchMode改成android:launchMode="singleTask"

    更多详情,请访问https://stackoverflow.com/a/36942185/3627429解答。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-05-21
      • 2012-07-21
      • 2012-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-11
      相关资源
      最近更新 更多