This is a simple text message sender developed by elder brother.
Attached source code:
-
- <? XML version = "1.0" encoding = "UTF-8"?>
-
- <Linearlayout xmlns: Android = "http://schemas.android.com/apk/res/android"
-
- Android: Orientation = "vertical"
-
- Android: layout_width = "fill_parent"
-
- Android: layout_height = "fill_parent"
-
- >
-
-
-
- <Textview
-
- Android: text = "@ string/moble"
-
- Android: layout_width = "fill_parent"
-
- Android: layout_height = "wrap_content"
- />
-
- <Edittext
-
- Android: Id = "@ + ID/mobile"
-
- Android: layout_width = "fill_parent"
-
- Android: layout_height = "wrap_content"/>
-
- <Textview
-
- Android: text = "@ string/content"
-
- Android: layout_width = "fill_parent"
-
- Android: layout_height = "wrap_content"
-
- />
-
- <Edittext
- Android: Id = "@ + ID/content"
-
- Android: layout_width = "fill_parent"
-
- Android: layout_height = "wrap_content"
-
- Android: minlines = "5"/>
-
- <Button
-
- Android: Id = "@ + ID/Send"
-
- Android: text = "@ string/Send"
-
- Android: layout_width = "fill_parent"
-
- Android: layout_height = "wrap_content"
-
- > </Button>
-
- </Linearlayout>
- Package gphone. CC. ISMs;
-
-
-
- Import Android. App. activity;
-
- Import Android. OS. Bundle;
-
- Import Android. telephony. smsmanager;
-
- Import Android. View. view;
-
- Import Android. widget. Button;
-
- Import Android. widget. edittext;
-
- Import Android. widget. Toast;
-
-
-
- Import java. util. arraylist;
-
-
-
- Public class ismsactivity extends Activity
-
- {
-
- Edittext mobile = NULL;
-
- Edittext content = NULL;
-
- Button sent = NULL;
- /** Called when the activity is first created .*/
-
- @ Override
-
- Public void oncreate (bundle savedinstancestate)
-
- {
-
- Super. oncreate (savedinstancestate );
-
- Setcontentview (R. layout. Main );
-
-
-
-
-
-
-
-
- Sent = (button) This. findviewbyid (R. Id. Send );
-
- Sent. setonclicklistener (New button. onclicklistener (){
- Public void onclick (view ){
-
- Mobile = (edittext) findviewbyid (R. Id. Mobile );
-
- String mobilestr = Mobile. gettext (). tostring ();
-
- Content = (edittext) findviewbyid (R. Id. content );
-
- String contentstr = content. gettext (). tostring ();
-
-
-
- Smsmanager = smsmanager. getdefault ();
-
-
- If (contentstr. Length ()> 70 ){
-
- Arraylist <string> contents = smsmanager. dividemessage (contentstr );
-
- For (string SMS: Contents ){
-
- Smsmanager. sendtextmessage (mobilestr, null, contentstr, null, null );
-
- }
- }
-
- Else {
-
- Smsmanager. sendtextmessage (mobilestr, null, contentstr, null, null );
-
-
-
- }
-
- Toast. maketext (ismsactivity. This, R. String. MSG, Toast. length_long). Show ();
-
-
-
- }
-
- });
-
-
-
-
- }
-
- }
Androidminifast. xml
-
- <? XML version = "1.0" encoding = "UTF-8"?>
-
- <Manifest xmlns: Android = "http://schemas.android.com/apk/res/android"
-
- Package = "gphone. CC. isms"
-
- Android: versioncode = "2"
-
- Android: versionname = "1.1" type = "codeph" text = "/codeph">
-
- <Application Android: Label = "@ string/app_name" Android: icon = "@ drawable/icon">
-
- <Activity Android: Name = "ismsactivity"
-
- Android: Label = "@ string/app_name">
- <Intent-filter>
-
- <Action Android: Name = "android. Intent. Action. Main"/>
-
- <Category Android: Name = "android. Intent. Category. launcher"/>
-
- </Intent-filter>
-
- </Activity>
-
- </Application>
-
- <Uses-SDK Android: minsdkversion = "3"/>
-
- <Uses-Permission Android: Name = "android. Permission. send_sms"/>
-
-
-
- </Manifest>
String. xml
- <? XML version = "1.0" encoding = "UTF-8"?>
- <Resources>
- <String name = "app_name"> ISMs </string>
- <String name = "moble"> enter the phone number </string>
- <String name = "content"> enter the text message content </string>
- <String name = "send"> send SMS </string>
- <String name = "MSG"> sms sent </string>
- </Resources>
: ISMs (Change RAR to APK)