[Android] SpotifyAppRemote doesn't call onConnected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Plan
Premium
Country
Netherlands
Device
Oneplus 8T
Operating System
Android 14
My Question or Issue
Hi, I am trying to make a simple app that can scan a qr code and use the qr code info to start playing a song on Spotify in the background.
(I am a total android dev beginner btw).
I think the authorisation is working, because I don't get any errors related to that any more, but now I am receiving these errors:
Spoiler
2024-10-13 15:46:42.992 8836-8836 System.out com.example.gwoonguess I trying to connect!
2024-10-13 15:46:42.997 8836-8836 Compatibil...geReporter com.example.gwoonguess D Compat change id reported: 247079863; UID 10514; state: ENABLED
2024-10-13 15:46:43.004 8836-8836 ViewRootImplExtImpl com.example.gwoonguess D MotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=560.51855, y[0]=1395.582, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=746224337, downTime=746224283, deviceId=3, source=0x1002, displayId=0, eventId=39702375 } handled by client, just return
2024-10-13 15:46:43.035 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 952
2024-10-13 15:46:43.036 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.036 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.037 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.037 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.038 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.038 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.039 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.039 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.039 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 952
2024-10-13 15:46:43.039 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.040 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.040 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.040 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.041 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.041 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.041 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.041 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.042 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.042 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.043 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.043 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.043 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.043 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.044 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.044 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.044 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.044 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.045 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.045 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.046 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.046 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.047 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.047 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.047 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.048 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.048 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 952
2024-10-13 15:46:43.048 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.048 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.049 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.049 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.049 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.049 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.050 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.050 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:44.702 8836-8884 ProfileInstaller com.example.gwoonguess D Installing profile for com.example.gwoonguess
2024-10-13 15:46:42.997 8836-8836 Compatibil...geReporter com.example.gwoonguess D Compat change id reported: 247079863; UID 10514; state: ENABLED
2024-10-13 15:46:43.004 8836-8836 ViewRootImplExtImpl com.example.gwoonguess D MotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=560.51855, y[0]=1395.582, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=746224337, downTime=746224283, deviceId=3, source=0x1002, displayId=0, eventId=39702375 } handled by client, just return
2024-10-13 15:46:43.035 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 952
2024-10-13 15:46:43.036 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.036 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.037 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.037 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.038 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.038 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.039 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.039 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.039 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 952
2024-10-13 15:46:43.039 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.040 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.040 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.040 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.041 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.041 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.041 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.041 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.042 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.042 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.043 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.043 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.043 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.043 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.044 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.044 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.044 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.044 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.045 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.045 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.046 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.046 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.047 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.047 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Info; annotation class 955
2024-10-13 15:46:43.047 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.048 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/HelloDetails; annotation class 955
2024-10-13 15:46:43.048 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 952
2024-10-13 15:46:43.048 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.048 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.049 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.049 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.049 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.049 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.050 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:43.050 8836-8878 mple.gwoonguess com.example.gwoonguess W Unable to resolve Lcom/spotify/protocol/types/Roles; annotation class 955
2024-10-13 15:46:44.702 8836-8884 ProfileInstaller com.example.gwoonguess D Installing profile for com.example.gwoonguess
(The issue here is that it is not printing the "connected Yay!")
Does someone maybe know what I am missing here / what I am doing wrong? Thanks!
Setup code:
Spoiler
private val clientId = "id"
private val redirectUri = "http://localhost"
private val connectionParams = ConnectionParams.Builder(clientId)
.setRedirectUri(redirectUri)
.showAuthView(true)
.build()
private var spotifyAppRemote: SpotifyAppRemote? = null
On debug button press code ("scanning the qr code"):
Spoiler
println("trying to connect!")
SpotifyAppRemote.connect(this, connectionParams, object : Connector.ConnectionListener {
override fun onConnected(appRemote: SpotifyAppRemote) {
spotifyAppRemote = appRemote
println("Connected! Yay!")
// Now you can start interacting with App Remote
spotifyAppRemote!!.playerApi.play("spotify:track:5a1iz510sv2W9Dt1MvFd5R")
}
override fun onFailure(throwable: Throwable) {
println(throwable.message)
// Something went wrong when attempting to connect! Handle errors here
}
})
Labels:
- Labels:
-
Android
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page