i have this code to log in to spotify in my app. I using the offical spotify lib.
public void spotifyLoginBtnClicked(View v){
//start the authentication for spotify
AuthenticationRequest.Builder builder = new AuthenticationRequest.Builder(clientID, AuthenticationResponse.Type.TOKEN, redirectURI);
builder.setScopes(new String[]{"user-read-private", "streaming"});
AuthenticationRequest request = builder.build();
// open LoginActivity
AuthenticationClient.openLoginActivity(this, activityIdentification, request);
}
Im wondering now how i can create a logout button. Because once logged in, if i press the login button again, it just returns. So i'am unable to change the user. I havent found anything in the java doc.