私は現在、Spotify APIを実装しているアンドロイドアプリを開発中です。私はチュートリアルを使用して私のアプリを見分けるコードをすべて持っていて、いつか私のアプリに取り組んでいます。ユーザー認証後に私のアプリから曲を演奏すると、それは私のエミュレータ上で完璧に動作します。私はそれを私の電話に切り替えるとうまくいかず、アンドロイドの応答でINVALID_APP_IDエラーが出ました。私は自分の携帯電話からスポットライトを外して、アプリから見分けるためにログインしようとしましたが、クラッシュせずに携帯電話から音楽を再生することができました。だから私の質問は私がそれを修正する方法ですか?ここでは、ユーザを認証するための私のコードは次のとおりです。Spotify API:INVALID_APP_ID
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
// Check if result comes from the correct activity
if (requestCode == requestcode) {
AuthenticationResponse response = AuthenticationClient.getResponse(resultCode, intent);
if (response.getType() == AuthenticationResponse.Type.TOKEN) {
Config playerConfig = new Config(this, response.getAccessToken(), client_id);
token = response.getAccessToken();
Spotify.getPlayer(playerConfig, this, new Player.InitializationObserver() {
@Override
public void onInitialized(Player player) {
mPlayer = player;
mPlayer.addConnectionStateCallback(.this);
mPlayer.addPlayerNotificationCallback(.this);
}
@Override
public void onError(Throwable throwable) {
Log.e("MainActivity", "Could not initialize player: " + throwable.getMessage());
}
});
}
}
}
これはまさに私に起こっていることです。私はあなたの指示に従って、私の結果を投稿しようとします – chntgomez