-1 down vote favorite share [fb] share [tw]
I have an audio(.mp3) file and some information related to it. I want to share with Facebook, E Mail, SMS/MMS etc.. What i have done is : when user clicks on Share Button, it pops up list of all supported apps that can handle this Intent. But this doesnot show Facebook and SMS/MMS options. Here is my code.. public void shareWithFriends(int resId) { Intent share = new Intent(Intent.ACTION_SEND); share.setType("audio/mp3"); share.putExtra(Intent.EXTRA_SUBJECT,"Ringtone File : "+ getResources().getResourceEntryName(resId)+".mp3"); share.putExtra(Intent.EXTRA_TEXT,"Ringtone File : "+getResources().getResourceEntryName(resId)+".mp3"); share.putExtra(Intent.EXTRA_STREAM,Uri.parse("android.resource:// com.my.android.soundfiles/"+resId)); share.putExtra("sms_body","Ringtone File : "+ getResources().getResourceEntryName(resId)+".mp3"); startActivity(Intent.createChooser(share, "Share Sound File")); } Here are some results : When i use mime type audio/mp3, only Email options pops up. No Facebook and SMS/MMS share. When i use mime type /, Email and SMS options pops up. No Facebook Option is there. Here interesting to see that when i click on SMS option, only text appears, I dont see any any mp3 file attached (Same thing happens in Whatsapp application (as i have whatsapp installed on my phone). However when i click on any Mail app (eg.Gmail or Yahoo mail ) it shows me mp3 file attached. Can anybody please tell me where i am going wrong ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en