0

I am trying to develop an app, where one of the requirement is to send email or SMS to the contact which the user picks. When the user needs to send message, they can pick the contact from the contact list. If the user selects the "phone number" of the contact, I need to start SMS application and insert my message contact. If the user selects the contact email address from the contact list, I need to open the EMail application with my content in Subject and body.

How do the application know about the user input??

Madjokr
  • 147
  • 2
  • 16

1 Answers1

0

I am not an expert on this topic but it is interesting to me so I have done some reading about it.

You have the action of selecting a phone number or email address right? So if the user selects a phone number you can use SmsManager for that (here is an article about it http://mobiforge.com/developing/story/sms-messaging-android ). And a related Stack Overflow article discusses sending emails on the Android platform and one user gives a very nice Java example of doing this. Here is the article: Sending Email in Android using JavaMail API without using the default/built-in app

I hope these might be of some help!

Community
  • 1
  • 1
Stephen Tetreault
  • 769
  • 1
  • 8
  • 26