Im whatsapp를 통해 mp3 파일을 공유하려고합니다. 그것은 Gmail과 같은 다른 응용 프로그램과 완벽하게 작동하지만, dosent는 whatsapp에서 작동합니다. 누구든지 나를 도울 수 있습니까? putExtra()를 추가해야합니까? 여기 Intent.ACTION_SEND Whatsapp
내 코드입니다 :public void shareWithFriends(int id)
{
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("audio/mp3");
//share.putExtra(Intent.EXTRA_SUBJECT,"subject");
//Uri uri = Uri.parse("android.resource://com.igs.pokemonsoundboard/" + id);
Uri uri = Uri.parse("android.resource://com.igs.pokemonsoundboard/raw/" + R.raw.pikachump3);
share.putExtra(Intent.EXTRA_STREAM,uri);
//share.putExtra("sms_body","Ringtone File :");
startActivity(Intent.createChooser(share, "Share sound"));
}
감사)
이 코드가 작동하지 않습니다.'sdcard에 파일을 저장 했는데도 '보내지 못했습니다. 다시 시도하십시오.'라는 메시지가 나타납니다. –