SHARE
TWEET

Untitled

a guest Apr 20th, 2012 1,552 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. How to call whatsapp as an Intent from my app on Android?
  2. Intent sendIntent = new Intent(Intent.ACTION_VIEW);
  3.             sendIntent.putExtra("sms_body", "The SMS text");
  4.             sendIntent.setType("vnd.android-dir/mms-sms");
  5.  
  6.             startActivity(sendIntent);
  7.        
  8. Intent i = new Intent(android.content.Intent.ACTION_SEND);
  9.  
  10. i.setType("text/plain");
  11. i.putExtra(Intent.EXTRA_SUBJECT, "Subject");
  12. i.putExtra(Intent.EXTRA_TEXT, "Message body");
  13.  
  14. startActivity(Intent.createChooser(i, "Share dialog title"));
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top