Closed haslinger closed 2 years ago
@haslinger I was stuck here too. After a bit of research on how redirects works I figured it out. Just add below lines in AndroidManifest.xml
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<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="stravaflutter" android:host="redirect" />
</intent-filter>
Also this : On Strava API make sure "Authorization Callback Domain" set to "redirect"
@abhinandanbr Thank you so much for pointing this out to me, I had the extra line
<data android:pathPattern="/.*" />
in that broke it in my app. Leaving this issue open, as this line should also be removed from the README, I guess?
@abhinandanbr Thank you so much for pointing this out to me, I had the extra line
<data android:pathPattern="/.*" />
in that broke it in my app. Leaving this issue open, as this line should also be removed from the README, I guess?
@haslinger You are welcome. Yup. That's the culprit! Needs to be removed.
thanks a lot for your feedback. removed that line from documentation
I tried to update my project to latest strava_flutter (from github) and the integration is really a pleasure. But I have i problem: After I confirm on the authorization screen from Strava, I no longer get redirected. On Chrome, there is a short flicker (maybe a redirect to itself), on Firefox the browser switches to a white page with a link "You are being redirected". That link targets
stravaflutter://redirect?state=&code=aLongHexCode&scope=read,activity:read_all,profile:read_all,read_al
I am testing on a tablet, and a phone, both running Android 11.I reread the docs here, they don't seem to have changed, especially double checked the
<intent filter>
part. I am developing usingSo I thought, I better check differences to the example you provide. And I am seing the same behaviour in the example (so no need to look into my app yet - which is open source, so just for reference: Encrateia ). As soon as I insert my credentials via secret.dart all analysis errors vanish, but starting let's assembleDebug fails. Reason: path_provider needs a newer SDK version
So I change compileSdkVersion and targetSdkVersion to 31. Then compiling fails again, this time with
The link provided in the error message shows Kotlin Version 1.6.10, so I set this. (1.3.50 is in the repo code). Then compilation succeeds, the app starts, but the behaviour is as described above: The redirect back is not working.
I guess the changes have something to do with the upgrade of the compileSdKVersion and/or the Kotlin version. Any help appreciated. Here is a fork of the repo showing the current state of my attempt to get the example running.
P.S: A big thank you for the work you are putting into this library! :heart: