2013-10-22 26 views
0

我有一個鏈接到Soundcloud軌道的移動應用程序。在Android上,單擊這些鏈接會彈出一個對話框,要求用戶使用「完成操作」瀏覽器或Soundcloud應用程序。在Android上的Soundcloud應用程序中強制啓動Soundcloud軌道

enter image description here

是否有辦法繞過這個屏幕,只是在球員的SoundCloud播放的曲目?

這是我目前使用的代碼。請提出任何修改或新方法來做到這一點。

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

回答

7

最後,我自己找到了解決方案。似乎沒有人知道這一點。 通過使用以下代碼片段,您可以在Android應用程序中默認打開聲音雲播放器。

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

重要提示:您必須在Android設備上安裝聲音雲播放器。

更新

的SoundCloud社區是嚴格推薦使用sounds代替tracks

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

你應該接受這個作爲答案。 – Adam

0

同樣的作品與用戶:

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

方案的SoundCloud://跟蹤不工作一些機器人設備。由於從SoundCloud社區他們嚴格推薦使用聲音的代替軌道

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

謝謝,我更新了答案。 – enadun

相關問題