I'm using the Android SDK Authentication Library for Apple Music, Up until about two days ago it worked fine and I managed to retrieve a Music User Token, However I accidentally deleted the Apple Music App and upon re-installation whenever I try to authenticate the app returns with an error: USER_CANCELLED even though I didn't cancel and I successfully logged in.Authentication Code:private void authenticateApple(String token){
Intent intent = authenticationManager.createIntentBuilder(token)
.setHideStartScreen(true)
.setStartScreenMessage("Sign In")
.build();
startActivityForResult(intent, REQUEST_CODE_APPLE_MUSIC_AUTH);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_CODE_APPLE_MUSIC_AUTH) {
TokenResult result = authenticationManager.handleTokenResult(data);
if (result.isError()) {
TokenError error = result.getError();
Log.e("ERROR", "error:" + error.toString());
}
else {
editor.putString("music_user_token", result.getMusicUserToken());
editor.apply();
read_playlists();
}
}
else {
super.onActivityResult(requestCode, resultCode, data);
}
}LogCat:2020-03-25 18:54:51.614 31849-31849/com.example.switcheroo D/APPLE MUSIC: STARTING FLOW2020-03-25 18:54:51.626 31849-31849/com.example.switcheroo D/ViewRootImpl@bae0ea3[HomeAct]: MSG_WINDOW_FOCUS_CHANGED 02020-03-25 18:54:51.658 31849-31854/com.example.switcheroo I/zygote64: Do partial code cache collection, code=27KB, data=26KB2020-03-25 18:54:51.658 31849-31854/com.example.switcheroo I/zygote64: After code cache collection, code=27KB, data=26KB2020-03-25 18:54:51.658 31849-31854/com.example.switcheroo I/zygote64: Increasing code cache capacity to 128KB2020-03-25 18:54:51.725 31849-31849/com.example.switcheroo D/SDKUriHandlerActivity: onCreate: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXV etc...(dev token)2020-03-25 18:54:51.726 31849-31849/com.example.switcheroo D/AuthUtils: deeplinkAppleMusic: uri = musicsdk://applemusic/authenticate-v1?appPackage=com.example.switcheroo&devToken=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlQyOEpCN0pQRk0ifQ.eyJpYXQiO etc...(dev token)2020-03-25 18:54:51.727 31849-31849/com.example.switcheroo D/a: deeplinkAppleMusic: isAppleMusicInstalled(activity) = 02020-03-25 18:54:51.816 31849-31877/com.example.switcheroo D/OpenGLRenderer: eglDestroySurface = 0x73dc4528702020-03-25 18:54:51.816 31849-31877/com.example.switcheroo D/OpenGLRenderer: endAllActiveAnimators on 0x73db471c00 (RippleDrawable) with handle 0x73e62ac8402020-03-25 18:54:51.832 31849-31849/com.example.switcheroo D/ViewRootImpl@bae0ea3[HomeAct]: Relayout returned: old=[0,0][1440,2560] new=[0,0][1440,2560] result=0x5 surface={valid=false 0} changed=true2020-03-25 18:54:52.697 31849-31849/com.example.switcheroo D/ViewRootImpl@bae0ea3[HomeAct]: Relayout returned: old=[0,0][1440,2560] new=[0,0][1440,2560] result=0x1 surface={valid=false 0} changed=false2020-03-25 18:55:09.413 31849-31849/com.example.switcheroo D/SDKUriHandlerActivity: onActivityResult: 2022, data = Intent { (has extras) }2020-03-25 18:55:09.450 31849-31849/com.example.switcheroo E/ERROR: error:USER_CANCELLED2020-03-25 18:55:09.466 31849-31849/com.example.switcheroo D/ViewRootImpl@68035bf[AppleReadAct]: setView = DecorView@fa507d5[AppleReadAct] TM=true MM=false2020-03-25 18:55:09.475 31849-31849/com.example.switcheroo D/ViewRootImpl@68035bf[AppleReadAct]: dispatchAttachedToWindow2020-03-25 18:55:09.494 31849-31849/com.example.switcheroo V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 02020-03-25 18:55:09.495 31849-31849/com.example.switcheroo D/ViewRootImpl@68035bf[AppleReadAct]: Relayout returned: old=[0,0][0,0] new=[0,0][1440,2560] result=0x7 surface={valid=true 497784123392} changed=trueI tried restarting my phone but the problem persists, Any ideas? (I'm running the app on a Galaxy s7 edge)EDIT: I also tried this on an s9 and got the same results...