Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/216.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Android上的Soundcloud应用程序中强制打开Soundcloud曲目_Android_Soundcloud - Fatal编程技术网

在Android上的Soundcloud应用程序中强制打开Soundcloud曲目

在Android上的Soundcloud应用程序中强制打开Soundcloud曲目,android,soundcloud,Android,Soundcloud,我有一个移动应用程序链接到Soundcloud track。在Android上,点击这些链接会弹出一个对话框,要求用户使用浏览器或Soundcloud应用程序“完成操作” 有没有办法绕过此屏幕,在Soundcloud播放器中播放曲目 这是我目前使用的代码。请建议任何修改或新的方式来做到这一点 Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://m.soundcloud.com/blackburnravers/

我有一个移动应用程序链接到Soundcloud track。在Android上,点击这些链接会弹出一个对话框,要求用户使用浏览器或Soundcloud应用程序“完成操作”

有没有办法绕过此屏幕,在Soundcloud播放器中播放曲目

这是我目前使用的代码。请建议任何修改或新的方式来做到这一点

    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://m.soundcloud.com/blackburnravers/dj-nj-house-music-volume-3"));
    startActivity(intent);

最后我自己找到了解决办法。似乎没人知道这件事。 通过使用以下代码片段,您可以从Android应用程序默认打开sound cloud player

String id = "114143409"; //Track id
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("soundcloud://tracks:" + id));
startActivity(intent);
重要提示:您必须在android设备上安装sound cloud player

更新

Soundcloud社区严格建议使用
声音
而不是
曲目

String id = "114143409"; //Track id
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("soundcloud://sounds:" + id));
startActivity(intent);

这同样适用于用户:

String id = "123395690"; //Userid
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("soundcloud://users:" + id));
startActivity(intent);

方案soundcloud://tracks无法在某些android设备上运行。在soundcloud社区,他们严格建议使用声音而不是曲目

String id = "yOUR_id"; //Track id
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("soundcloud://sounds:" + id));
startActivity(intent);