Closed brim-borium closed 2 years ago
I tried the example app and it is not working for me on Android. At the same time main runs fine. Here are the logs for getAuthenticationToken()
which does seems to work:
V/InputMethodManager( 2194): Starting input: tba=com.nada.ok ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager( 2194): startInputInner - Id : 0
I/InputMethodManager( 2194): startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport( 2194): Input channel constructed: fd=102
D/InputTransport( 2194): Input channel destroyed: fd=96
D/ViewRootImpl@a0e56ca[LoginActivity]( 2194): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager( 2194): prepareNavigationBarInfo() DecorView@fe9b779[LoginActivity]
D/InputMethodManager( 2194): getNavigationBarColor() -855310
D/com.spotify.sdk.android.auth.LoginActivity( 2194): Response: token
I/com.spotify.sdk.android.auth.LoginActivity( 2194): Spotify auth completing. The response is in EXTRA with key 'response'
D/ViewRootImpl@a0e56ca[LoginActivity]( 2194): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager( 2194): prepareNavigationBarInfo() DecorView@fe9b779[LoginActivity]
D/InputMethodManager( 2194): getNavigationBarColor() -855310
D/ViewRootImpl@8a16dc2[MainActivity]( 2194): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager( 2194): prepareNavigationBarInfo() DecorView@b4d4436[MainActivity]
D/InputMethodManager( 2194): getNavigationBarColor() -855310
D/InputMethodManager( 2194): prepareNavigationBarInfo() DecorView@b4d4436[MainActivity]
D/InputMethodManager( 2194): getNavigationBarColor() -855310
V/InputMethodManager( 2194): Starting input: tba=com.nada.ok ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager( 2194): startInputInner - Id : 0
I/InputMethodManager( 2194): startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport( 2194): Input channel constructed: fd=101
D/InputTransport( 2194): Input channel destroyed: fd=102
D/ViewRootImpl@8a16dc2[MainActivity]( 2194): setWindowStopped(false) old=false
D/ViewRootImpl@a0e56ca[LoginActivity]( 2194): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager( 2194): prepareNavigationBarInfo() DecorView@fe9b779[LoginActivity]
D/InputMethodManager( 2194): getNavigationBarColor() -855310
D/ViewRootImpl@a0e56ca[LoginActivity]( 2194): setWindowStopped(true) old=false
W/libEGL ( 2194): EGLNativeWindowType 0x7dc00a0010 disconnect failed
D/OpenGLRenderer( 2194): eglDestroySurface = 0x7da6f5d380, 0x7dc00a0000
D/ViewRootImpl@a0e56ca[LoginActivity]( 2194): dispatchDetachedFromWindow
D/ViewRootImpl@a0e56ca[LoginActivity]( 2194): Surface release. android.view.ViewRootImpl.doDie:7976 android.view.ViewRootImpl.die:7944 android.view.WindowManagerGlobal.removeViewLocked:497 android.view.WindowManagerGlobal.removeView:435 android.view.WindowManagerImpl.removeViewImmediate:124 android.app.ActivityThread.handleDestroyActivity:4753 android.app.servertransaction.DestroyActivityItem.execute:39 android.app.servertransaction.TransactionExecutor.executeLifecycleState:145
D/InputTransport( 2194): Input channel destroyed: fd=94
I/flutter ( 2194): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter ( 2194): │ #0 _HomeState.setStatus (package:spotify_sdk_example/main.dart:635:13)
I/flutter ( 2194): │ #1 _HomeState.getAuthenticationToken (package:spotify_sdk_example/main.dart:447:7)
I/flutter ( 2194): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter ( 2194): │ 💡 Got a token: BQCdX96jqgGZ3L8Rl7VM-LUrmieCu2Sr3hXRaHc4l9l6ExBp-Ufz3JZTPJrtGmhHLPXjA-cJNm4ffwdQJt5QPkBDSFAwZS6aT-hzeqjhvlOmvuRmqhMX8gdm2rgmSUy0RJ3-1Yh5UoMqOJqeA9L4621qyJ5AhrgMBf5LZ3Ag8ggMXHiOABb9GyVhrBPWvolS8cAPiMax3nD1Ckz8q_HFUqjdgWLxXkr-60Q4xWvpIDw5U_U
I/flutter ( 2194): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
D/ViewRootImpl@a0e56ca[LoginActivity]( 2194): Surface release. android.view.ViewRootImpl$ViewRootHandler.handleMessage:4822 android.os.Handler.dispatchMessage:106
and for connectToSpotifyRemote()
which seems to have an issue connecting:
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerOptions; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 2 lines
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerOptions; annotation class 1300
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerState; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 2 lines
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerState; annotation class 1300
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerRestrictions; annotation class 1297
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerRestrictions; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 5 lines
4
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerRestrictions; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 1 line
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerRestrictions; annotation class 1300
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerState; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 2 lines
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerState; annotation class 1300
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Track; annotation class 1297
2
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Track; annotation class 1300
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Album; annotation class 1297
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Album; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 2 lines
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Album; annotation class 1300
2
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Track; annotation class 1300
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Artist; annotation class 1297
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Artist; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 2 lines
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Artist; annotation class 1300
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Track; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 4 lines
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Track; annotation class 1300
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/ImageUri; annotation class 1310
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/ImageUri; annotation class 1311
2
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/ImageUri; annotation class 2433
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Track; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 6 lines
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/Track; annotation class 1300
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerContext; annotation class 1297
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerContext; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 6 lines
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerContext; annotation class 1300
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerContext; annotation class 1297
2
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerContext; annotation class 1300
I/chatty ( 2194): uid=10246(com.nada.ok) identical 5 lines
W/da.o( 2194): Unable to resolve Lcom/spotify/protocol/types/PlayerContext; annotation class 1300
Which android version did you have on your phone? For me with Android 11 it worked, but I will look into it
@brim-borium I tried on two devices, one on Android 9 and one on 8.1 and they both have the same behaviour.
@brim-borium actually I take that back. It does work for me. The UI of the example app got me confused which actually reminds me that I want to make a PR about that.
However I do get the Unable to resolve
warnings on both your branch and main. Is that something we can look into?
im using Android 12 right now, and I also get multiple Unable to resolve
warnings when running the application.
However, the functionality of the application still seems to work.
here are just some of the warnings I get when using connectToSpotify:
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 1356
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 1359
W/.(27897): Unable to resolve Lcom/spotify/protocol/types/WelcomeDetails; annotation class 1356
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/WelcomeDetails; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/WelcomeDetails; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/UserStatus; annotation class 1356
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/UserStatus; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/UserStatus; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/UserStatus; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/UserStatus; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/UserStatus; annotation class 1359
W/.c(27897): Unable to resolve Lcom/spotify/protocol/types/UserStatus; annotation class 1359
Will leave the unable to resolve for another pr. I think this was always coming up on android. But I will look into that. Also agree we should update the sample. In this pr I just moved the image to be in sync with the currently playing track
@brim-borium btw, will you be releasing a new release for this fix?
will be fine if you are not keen.
@darylhjd yes will do, after I reviewed the open issues and check whether something's should also go into the release
Still an issue
is this issue fixed yet? the functions still work properly but it creates a mess in the console!
I was able to resolve the same issue (the noisy "Unable to resolve X" logs) in an unrelated context and have shared my insights in the linked ticket. Hopefully it may help y'all as well!
Please check if android is still working on your end :)