Showing posts with label SMS. Show all posts
Showing posts with label SMS. Show all posts

Saturday, 6 April 2013

Android SMS How to send an MMS via Intents?


Send a picture via mms. 

          Uri mmsUri = Uri.parse("content://media/external/images/media/1");
          Intent intent = new Intent(Intent.ACTION_SEND); intent.putExtra("sms_body", "Hi how are you");
          intent.putExtra(Intent.EXTRA_STREAM, mmsUri);
          intent.setType("image/png");
          startActivity(intent);

How to send an SMS from my android application?


   It's easy to send SMS Messages using the SmsManager. 

         SmsManager m = SmsManager.getDefault();
         String destination = "xxxxxxxxxxx";
         String text = "Hello, Jenny!";
         m.sendTextMessage(destination, null, text, null, null);

Disqus for Android