【发布时间】:2017-12-11 10:02:53
【问题描述】:
我正在尝试在 Android Auto 上打开 Spotify 并播放特定歌曲。
使用下面的代码我正在手机上打开 Spotify,但我需要直接在 Car 上打开它。
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("spotify:track:" + spotifyId));
intent.setPackage("com.spotify.music");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
有人知道在 Android Auto 上打开 Spotify 的意图是什么吗?
【问题讨论】:
标签: android android-intent spotify android-auto