android-sdk
android-sdk copied to clipboard
Android API 19 Auth not working anymore
Hi guys!
I am using your SpotifySDK (Auth &Remote) with my old Galaxy S4 Mini, API 19.
I have the following issue that i did'nt have before. When i try to login through the AuthSDK, the SDK Login fails and the WebView-Fallback-Login could not be completed; i get this error being logged:
E/com.spotify.sdk.android.authentication.LoginActivity: Can't use LoginActivity with a null caller. Possible reasons: calling activity has a singleInstance mode or LoginActivity is in a singleInstance/singleTask mode
Maybe this is a new issue triggered by the update to SDK v.0.7. I am used to the AuthSDK not working on API19 but at least the Webview fallback always worked on this phone. Now this is no longer possible.
I hope you can help me and my stoneage-smartphone-buddys!
Issue found on 11.01.2020.
SDK Version:
0.7
OS Version:
API 19 (Galaxy S4 Mini)
Scope(s):
app remote
Actual behaviour:
- Implement the auth flow like in your docs (Auth SDK with Webview fallback)
- Open App
- SDK fails, Webview fallback starts
- Log: 01-11 11:45:03.956 9445-9445/xxxxx E/com.spotify.sdk.android.authentication.LoginActivity: Can't use LoginActivity with a null caller. Possible reasons: calling activity has a singleInstance mode or LoginActivity is in a singleInstance/singleTask mode
Hi @anscash I know there has been a change on the LoginActivity launch-mode recently. Can you share with me which Spotify version are you using?
Hi @mdelolmo Sure. I am using Spotify 8.5.40.195
Greetings
Hi @anscash
Can you try our new version of the auth-lib, to see if it makes a difference?
implementation 'com.spotify.android:auth:1.2.2'
Hi @mdelolmo
Unfortunately not, the app still tries to
- connect through SingleSignOn -> not working
- browser-fallback: URL is being loaded but -> no "result" (result would be a successful redirect to my app)
Happy day! anscash
Me, too. I cannot perform any SSO with the Android API anymore for some days. I changed to auth:1.2.2, where is a breaking API change. But this didn't help - same error occurs ("INVALID_CLIENT") ... I tried #185 and added also my publishing key (instead of the upload key) from the Android Developer Console / App Signature. In my local environment that seems to work. I will check whether it stills works after releasing...
Hi @ehambuch
I don't think your error is the same one as the one @anscash is having. The INVALID_CLIENT error is due to a configuration error.
Maybe it's better to discuss your error on https://github.com/spotify/android-sdk/issues/185, which seems more related.
Hi @anscash I gotted the same problem but with the new version of auth-lib:
implementation project(':spotify-auth-release-1.2.3')
my problem is almost fixed, in this new version the implementation of webview fallback works with Android API 19 but only if Spotify app isn't installed
With the 1.2.5 it would open the webview instead of the app. Bumping to 1.2.6 solved it for me.
Highly recommend updating your targetSdkVersion to 23 since there are new changes and policies coming to the Google Play Store. If not and this is just a personal thing, hope you figure it out!
I was seeing this issue when I had the manifest intent filter set to the wrong android:host value. I have it set to the right thing now and it works just fine!