2012-12-26 16 views
1

在我的Android应用我录制的音频文件,然后我想分享到的SoundCloud和GET的该URL。最好的方法是什么?如何上传声音剪辑到的SoundCloud

我可以通过一个明确的Intent分享,但我怎么能得到跟踪网址呢?我应该使用java包装来上传音频吗?

回答

2
File myAudiofile = new File("/path/to/audio.mp3"); 
Intent intent = new Intent("com.soundcloud.android.SHARE") 
    .putExtra(Intent.EXTRA_STREAM, Uri.fromFile(myAudiofile)) 
    .putExtra("com.soundcloud.android.extra.title", "Demo"); 
    // more metadata can be set, see below 

try { 
    // takes the user to the SoundCloud sharing screen 
    startActivityForResult(intent, 0); 
} catch (ActivityNotFoundException e) { 
    // SoundCloud Android app not installed, show a dialog etc. 
} 

参见:

+0

如果我想找回声音的环节是什么? –

+0

了这样https://github.com/soundcloud/android-intent-sharing/wiki/Standard-sharing-flow,但没有发生。所有的应用程序都得到了这个文件,但是当我选择SoundCloud时什么都没有发生 –

相关问题