In my android application I want to send MMS from background service without user interaction, I tried to use SmsManager.sendMultimediaMessage
but this method requires API-21 atleast and I am working on API-19 (Android KitKat). So please tell how can I send MMS from background service without user interaction in Android API level 19 (KitKat)?
Asked
Active
Viewed 194 times
-1

Salu
- 53
- 7
-
Your users will hate you, and uninstall your app immediately. MMS have a cost. Which is much heavier than that of an SMS. – Phantômaxx Feb 27 '17 at 14:59
-
how can we send picture using SMS? – Salu Feb 27 '17 at 15:05
-
You **can't** share an image via SMS. But you can send it via eMail. Or share the image on Telegram or Whatsapp. – Phantômaxx Feb 27 '17 at 15:08
1 Answers
0
Use this page.
since i shouldn't answer with just a link. I copied some content from there.
Settings sendSettings = new Settings();
sendSettings.setMmsc(mmsc);
sendSettings.setProxy(proxy);
sendSettings.setPort(port);
you can get them something like (found at Set APN programmatically on Android - answear by vincent091):
Cursor cursor = null;
if (Utils.hasICS()){
cursor =SqliteWrapper.query(activity, activity.getContentResolver(),
Uri.withAppendedPath(Carriers.CONTENT_URI, "current"), APN_PROJECTION, null, null, null);
} else {
cursor = activity.getContentResolver().query(Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current"),
null, null, null, null);
}
cursor.moveToLast();
String type = cursor.getString(cursor.getColumnIndex(Telephony.Carriers.TYPE));
String mmsc = cursor.getString(cursor.getColumnIndex(Telephony.Carriers.MMSC));
String proxy = cursor.getString(cursor.getColumnIndex(Telephony.Carriers.MMSPROXY));
String port = cursor.getString(cursor.getColumnIndex(Telephony.Carriers.MMSPORT));

Community
- 1
- 1

Mehran Zamani
- 831
- 9
- 31