FitBit oAuth问题与Firefox或互联网浏览器

FitBit oAuth问题与Firefox或互联网浏览器

问题描述:

我已将Fitbit与我的Android应用程序集成。在使用Chrome浏览器连接到Fitbit时,我没有遇到任何挑战,但是当我尝试将它连接到Firefox或默认的Internet浏览器时,它不起作用。FitBit oAuth问题与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:launchMode="singleTop",它阻止我的应用程序在我的收件人活动的onNewIntent()上收到oAuth标记。但是这种情况只发生在我尝试使用Chrome以外的浏览器连接到Fitbit时。最后,我将我的launchMode更改为android:launchMode="singleTask"

有关更多详细信息,请访问https://*.com/a/36942185/3627429回答。