SHARE
TWEET

Untitled

a guest May 12th, 2012 372 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Intent.ACTION_SEND Whatsapp
  2. public void shareWithFriends(int id)
  3. {      
  4.   Intent share = new Intent(Intent.ACTION_SEND);
  5.   share.setType("audio/mp3");
  6.   //share.putExtra(Intent.EXTRA_SUBJECT,"subject");
  7.   //Uri uri = Uri.parse("android.resource://com.igs.pokemonsoundboard/" + id);
  8.   Uri uri = Uri.parse("android.resource://com.igs.pokemonsoundboard/raw/" + R.raw.pikachump3);
  9.   share.putExtra(Intent.EXTRA_STREAM,uri);
  10.   //share.putExtra("sms_body","Ringtone File :");
  11.   startActivity(Intent.createChooser(share, "Share sound"));
  12. }
  13.        
  14. final Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
  15. shareIntent.setType("audio/mp3");
  16. shareIntent.putExtra(android.content.Intent.EXTRA_STREAM, Uri.parse("file://"+path+filename));
  17. startActivity(Intent.createChooser(shareIntent, getString(R.string.share_sound)));
  18.        
  19. share.setType("audio/mpeg3")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top