新的Google Music Beta是否支持最终用户通过意图选择歌曲

问题描述

|| 我有一个使用
ACTION_PICK
允许用户选择歌曲的应用程序。选中该歌曲后,应用程序将使用光标位置,并稍后再执行另一个意图以显示
NOW_PLAYING
界面。在我在droid设备上安装Music Beta之前,该应用程序运行良好。然后应用程序以with2ѭ开始失败。目的和过滤器如下所示:
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType(\"vnd.android.cursor.dir/track\");
this.startActivity(intent);
我卸载了Music Bata,该应用程序再次正常运行。想看看这是否是与新的Google音乐应用程序有关的错误,并查看是否有人遇到此问题。     

解决方法

检查MusicUtils.java。那里有一些接听歌的电话。他们都有:
intent.setDataAndType(Uri.EMPTY,\"vnd.android.cursor.dir/track\");
在另一个地方,我发现:
if (id == RECENTLY_ADDED_PLAYLIST) {
    Intent intent = new Intent(Intent.ACTION_PICK);
    intent.setDataAndType(Uri.EMPTY,\"vnd.android.cursor.dir/track\");
    intent.putExtra(\"playlist\",\"recentlyadded\");
    startActivity(intent);
} else if (id == PODCASTS_PLAYLIST) {
    Intent intent = new Intent(Intent.ACTION_PICK);
    intent.setDataAndType(Uri.EMPTY,\"podcasts\");
    startActivity(intent);
} else {
    Intent intent = new Intent(Intent.ACTION_EDIT);
    intent.setDataAndType(Uri.EMPTY,Long.valueOf(id).toString());
    startActivity(intent);
}
在两个文件中,意图都通过Uri.EMPTY路由     

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...