Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Redirect url - need URGENT advice..

ANSWERED

 

Hello, I have an issue with the redirect_url on Android.. 

User is directed to the Authorization Page in Chrome Custom Tabs, when I click "agree", user is not redirected back to application.. 

 

What are the rules and expectancies regarding redirect_url for FitBit API?

I find the documentation on the website very unclear.. 

 

I have already set callback_uri in many different ways, with different outcomes:

 

Local Page with Auth Code, no redirect because not specified:

http://locallhost.com/

 

Error Not Found:

- http://locallhost.com/callback

- http://locallhost.com/redirect

 

What should I use to test locally? 

 

Oops it it not you, it is us.. 

- https://www.fitbit.com

 

Setting in the Application Page are correct. 

Settings in the Manifest are the following, adapted per redirect.. 

 

<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:host="www.locallhost.com/redirect"
android:scheme="http"/>
</intent-filter>

 

Best Answer
0 Votes
65 REPLIES 65

I'm sorry Niels I really dont know why your having problems get it to run on a real device since I use my Nexus 5 for testing. That said I've not tried it on an emulator since you added the graphs so i'm not sure how it looks there.

 

For the emulator vs. real device problem I would suggest StackOverflow, I really dont know what to suggest.

 

From a programming point of view, I'll have a look at the source again on my emulators and see if its different to the phone. But I think from a programming view point we've gone way further than this forum was intended for, but hit me up on GitHub and I'll happily help anyway I can

Ionic & Aria, Blaze (retired), Alta (retired), Surge (retired), Charge HR (retired), One (retired), Classic (retired) | Microsoft Surface | Google Pixel 2XL Android FitBit App
Best Answer

I am working on a functional prototype and have re-used the OAuth2 flow. This one works both on a real device and on emulator. Probably will finish this one this week and then continue with some larger applications and more focus on UX. If you want a second opinion or if I can help any way, please let me know.. I owe you one! 

 

Greetz 

Best Answer
0 Votes

That's great news! Did you managed to work out why the previous prototype wasn't working on your device?

 

I might take you up on that! If you ever want a hand again with anything give me shout, ether here or search Google for NxFIFTEEN - you can't miss me

Ionic & Aria, Blaze (retired), Alta (retired), Surge (retired), Charge HR (retired), One (retired), Classic (retired) | Microsoft Surface | Google Pixel 2XL Android FitBit App
Best Answer
0 Votes

Unfortunately I did not.. 

Used code snippets from what we have done on the Forum, and it just functioned.. 

If I find out why I will let you know..

 

Don't hesitate to reach out.. Take care! 

Best Answer
0 Votes

if its not too much trouble can you upload the full project

Best Answer
0 Votes

Hi @stuartma ... thanks so much for this!  It was SUPER helpful.

Best Answer
0 Votes