1
Uri clipUri = Uri.parse("android.resource://com.packagename.community/raw/" + rawname);
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, clipUri);
shareIntent.setType("audio/mpeg");
startActivity(Intent.createChooser(shareIntent, getResources().getText(R.string.send_to)));
此代碼幾乎工作,我可以成功發送剪輯到另一個應用程序(Dropbox的舉例),一切都很好,除了與它的文件缺少.mp3擴展名。試圖與意圖,但該文件的擴展名共享MP3不包括
什麼是以下變量的值(rawnames,clipUri)在調試或日誌 –