SKP SKP -3 years ago 112
Android Question

FitBit oAuth issue with Firefox or Internet browser

I have integrated Fitbit with my Android application. I am facing no challenge while connecting to Fitbit using Chrome browser, but when I am trying to connect it to Firefox or the default internet browser, it's not working.

Below is the intent filter I am using:


<!-- FitBit intent filter to get call back data for Authentication API -->
<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"/>

Please suggest.

Answer Source

I figured out the issue.

I had used android:launchMode="singleTop" which was preventing my app to receive the oAuth token on onNewIntent() of my recipient Activity. But this scenario was only happening when I tried to connect to Fitbit using any browser other than Chrome. Finally, I changed my launchMode to android:launchMode="singleTask"

For more details, visit answer.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download