smsmanager

Android delete sms messages in sent box

删除回忆录丶 提交于 2019-12-05 20:16:59
Before Android KitKat, it was possible to send SMS messages without them being stored in the sent folder of the installed messaging apps on the device, using this method: SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phonenumber, null, message, null, null); But how is it done post-KitKat? Do you have to delete the messages that are sent out by your app? And if so, how is it done correctly? Mike M. Starting with KitKat, any app with the SEND_SMS permission is able to send messages with the standard SmsManager methods, and the system will handle writing the messages to the

Pending Intents for sending SMS not working well while sending many messages

隐身守侯 提交于 2019-12-05 13:05:44
I am Developing an App , In which I send SMS and I need to find if It's delivered or not. Every thing seems to be well if I send A message to a person. But In some situations I got wrong Information , for example , First I send A message to number 0000 (But It will not deliver) and after it I send a message to number 0001 and It delivers (message to 0000 is still not delivered) but I got a toast with : sms delivered to 0000(But only message to 0001 is delivered) , What Should I do to fix this conflict in Delivery reports ? Here is my code: try { SmsManager smsManager = SmsManager.getDefault();

SmsManager MMS APIs on HTC/LG

不羁岁月 提交于 2019-12-05 10:00:44
问题 I'm using the new Android lollipop APIs for sending and receiving MMS messages: SmsManager.downloadMultimediaMessage and SmsManager.sendMultimediaMessage. This works well on Nexus 4 and 5, but not working at all on HTC One & LG G3 running lollipop. Looking at the logs on the HTC device, this looks like a worrying error log: MmsServiceBroker "Failed to bind to MmsService" Has anyone managed to get the new MMS APIs working across devices? If not, any workaround? EDIT: added LG G3 to the

How to send MMS without intent programmatically

我的梦境 提交于 2019-12-05 02:22:48
问题 Uri uri = Uri.parse("file://"+Environment.getExternalStorageDirectory()+"/test.png"); Intent i = new Intent(Intent.ACTION_SEND); i.putExtra("address","1234567890"); i.putExtra("sms_body","This is the text mms"); i.putExtra(Intent.EXTRA_STREAM,"file:/"+uri); i.setType("image/png"); startActivity(i); I want to send MMS but I don't want to use intent object like above because I am developing my own application of sms manager. So how can I send MMS? I am referring to this link code but I don't

How to start an activity on a certain time?

偶尔善良 提交于 2019-12-04 19:39:55
This question might be related to this and this question, but unlike those question I want to start them on a specific time, (say 11:12:13 on 15/03/2014). I am actually working on a project (SMS) that sends messages on a given time. try this code, I tested it: First: Create a calendar: Calendar calendar = Calendar.getInstance(); And set time by one of this ways: calendar.set(year, month, day, hourOfDay, minute); // be careful month start form "0" so for "May" put "4" or: calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, minute); Second: Add this: Intent intent = new

How to Know which Sms is sent/delivered from Android BroadcastReceiver?

一曲冷凌霜 提交于 2019-12-04 15:42:19
Hi Guys I have made simple app to send multiple SMS on android, and I cannot find known which sms is Sent/Delivered, because the delivery notification does not tell for which it is. here is my code : this.destination = data[0]; this.body = data[1]; PendingIntent piSend = PendingIntent.getBroadcast(aCtx, 0, new Intent(Cons.SMS_SENT),0); PendingIntent piDelivered = PendingIntent.getBroadcast(aCtx, 0, new Intent(Cons.SMS_DELIVERED), 0); SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(destination, null, body, piSend, piDelivered); Then I use broadcast receiver to get

how to send MMS without intent programatically

落花浮王杯 提交于 2019-12-03 21:29:10
Uri uri = Uri.parse("file://"+Environment.getExternalStorageDirectory()+"/test.png"); Intent i = new Intent(Intent.ACTION_SEND); i.putExtra("address","1234567890"); i.putExtra("sms_body","This is the text mms"); i.putExtra(Intent.EXTRA_STREAM,"file:/"+uri); i.setType("image/png"); startActivity(i); I want to send MMS but i dont want to use intent object like above because i am developing my own application of sms manager. So how can i send MMS ?? I am referring to this link code but I don't understand it and it doesn't work. There is no public API to send an MMS in Android at the moment. MMS

SMS send from within an app seem impossible to detect?

落爺英雄遲暮 提交于 2019-12-02 20:55:50
问题 I have just created a cool app that work with SMS. I would like to say to my users: don't worrry, my app send SMS but you can track them in your favourite SMS application. I don't want them to be afraid that I will overload their monthly fees. So, the way I send SMS is very simple: SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phoneNumber, null, position, pi, null); And that is very fine. Unfortunately, all sent SMS does not appear in any SMS application, so user doesn't know

SmsMessage.createFromPdu is deprecated in android API level 23

青春壹個敷衍的年華 提交于 2019-12-01 04:20:01
问题 I am trying to read received SMS using below code, it is working below API level 23, but in API level 23 createFromPdu method is deprecated. In google docs it has an alternate method but how do I use it. public class IncomingSms extends BroadcastReceiver { // Get the object of SmsManager final SmsManager sms = SmsManager.getDefault(); public void onReceive(Context context, Intent intent) { // Retrieves a map of extended data from the intent. final Bundle bundle = intent.getExtras(); try { if

i want to send SMS from Android application using SMS manager

谁说我不能喝 提交于 2019-11-30 16:33:37
I have tried sending but the SMS is automatically sent without getting known. I want to send SMS with field of To to be predefined from my code and can get the inbuilt SMS APP. My Code holder.SMS.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Log.e("sssssss", "aaaaaaaa"); try { // View view = (View) v.getParent(); // TextView number = (TextView) view.findViewById(R.id.phone); // String selected_mobile_sms = number.getText().toString(); // Log.e("sssssss", "ssssssss" + selected_mobile_sms); // sendSMS(); SmsManager sm = SmsManager.getDefault(); sm