0

Before, i used intents for same activity. I have sent some text to other class via implementing serializable both of class which is sending texts and other class which is taken texts. I used them: Text Sending Class Has:: intent.putExtra("text",text); startActivity(intent); Text Receiving Class Has: getIntent().getSerializableExtra("text").toString(); In my question for my new application, i have a listactivity which is stored some text. I want to send choosen text from list to send mms.apk's textfield. Is it possible to do that? Then user choose person from telephone directory and send message.

Many Thanks.

dunker
  • 97
  • 9

1 Answers1

0

I'm think your asking how to send a SMS from within you activity with a specific string... if that is the case then to send an SMS from within your activity you create a sms intent:

i = new Intent(Intent.ACTION_SENDTO, Uri.parse("sms:"));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.putExtra("sms_body", "your string here"); 

See this question too: launch sms application with an intent

Community
  • 1
  • 1
slayton
  • 20,123
  • 10
  • 60
  • 89
  • I want to develop something like that: When listitem is clicked, mms.apk(Messaging) will be opened and "Type To Compose"(textfield) will be taken listitem's text. Problem is How can i call getIntent().getSerializableExtra("smsbody") in mms.apk? – dunker Aug 18 '11 at 16:46
  • Many Thanks for forwarding. I will try these. I will write feedback here. – dunker Aug 18 '11 at 17:05
  • You probably don't actually want to target the mms.apk specifically. It will most certainly not exist on all devices and lots of users prefer 3rd party messaging clients. Using the intent specified above will allow the user to select which mms client they want to use. – slayton Aug 18 '11 at 17:42
  • I see. I decide to attempt for developing sending sms unit in my application. It will be stable for every single user. If i can solve it, i will give feedback here. Again, thank you so much. – dunker Aug 18 '11 at 22:35