Is it possible to send a mms and a email in a single button click event, if the button is clicked mms as well as email has to go, is it possible or not
Asked
Active
Viewed 533 times
0
-
then can u give some examples for sending a mms and email in a single button click event, i searched a lot but i could't find – Sesha Feb 23 '12 at 11:21
-
If you are able to have receiver's mobile number for sending MMS and email address for sending Email,when you click on a button,you can easily send both of them using a service. – Hiral Vadodaria Feb 23 '12 at 11:23
-
is it possible to send without using intent – Sesha Feb 23 '12 at 11:41
2 Answers
1
For SMS:
String phoneNo = txtPhoneNo.getText().toString();
String message = txtMessage.getText().toString();
if (phoneNo.length()>0 && message.length()>0)
sendSMS(phoneNo, message);
else
Toast.makeText(getBaseContext(),
"Please enter both phone number and message.",
Toast.LENGTH_SHORT).show();
}
private void sendSMS(String phoneNumber, String message)
{
PendingIntent pi = PendingIntent.getActivity(this, 0,
new Intent(this, SMS.class), 0);
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, message, pi, null);
}
for MMS:
refer to this link: enter link description here
Community
- 1
- 1
Shishir Shetty
- 2,007
- 3
- 20
- 34
0
Yes. Simply, call relevant tasks each other. In your AndroidManifest.xml file give the required permissions.
the pseudo code would be;
void MyButtonClick(View v){
startMMSTask(parameters);
startEmailTask(parameters);
}
denolk
- 769
- 14
- 26