Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Sending SMS using Intents.

Sending SMS using Intents.

Quickly share your Android Code Snippets here...

Sending SMS using Intents.

Postby Jhon » Wed Feb 10, 2010 7:21 am

Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.putExtra("sms_body", "Your Message");
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);

With above code we can easily launch the sms screen using intents.
Now just we give mobile number in To:Edit field.
Happy Journey
Jhon
Jhon
Freshman
Freshman
 
Posts: 9
Joined: Wed Sep 09, 2009 4:06 pm

Top

another method

Postby jarnaud » Mon Mar 01, 2010 9:43 pm

Here is another way:

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

(from http://www.devandro.com)

-
Android training online videos: http://android.voxisland.com
Jay
jarnaud
Freshman
Freshman
 
Posts: 3
Joined: Tue Feb 09, 2010 7:14 pm

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 4 guests