smsmanager

How to forward SMS forever?

China☆狼群 提交于 2019-12-23 05:27:51
问题 The following sample code is from interent, I don't know how to start or stop the monitor. I guess that it will be always monitor and forward SMS after I installed the .apk . I hope I can control to start or stop the monitor. How can I do? Thanks! And more, I hope to start the monitor automatically when I power on my android mobile phone, how can I do? Need I use local server function? <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"

How to send Google Maps location by SMS

我与影子孤独终老i 提交于 2019-12-23 02:48:10
问题 how do I assign a variable LocationManager in the text string of SMSManager ? I want to send the sms with coordinates as text message. private LocationManager lm; private LocationListener locationListener; lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); locationListener = new MyLocationListener(); lm.requestLocationUpdates( LocationManager.GPS_PROVIDER, 0, 0, locationListener); lm.requestLocationUpdates( LocationManager.NETWORK_PROVIDER, 0, 0, locationListener); btnSendSMS

is there a limit to the number of numbers to send an SMS?

♀尐吖头ヾ 提交于 2019-12-23 01:36:55
问题 in my app, I want to send a mass SMS to a bunch of numbers, and I want to know if there is a time threshold or a size limit to the list of recipients of an SMS. all I saw in previous questions is code that no longer exists in the current builds of Android like references to SMSDispatcher and Settings constants that no longer exist in the current code. 回答1: after going through the Android sources for all the APIs supported by my app I cam up with the following code private void

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

流过昼夜 提交于 2019-12-21 19:52:49
问题 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

Android SmsManger Delivery report

☆樱花仙子☆ 提交于 2019-12-21 04:56:14
问题 I send multiple message to multiple contact, and for each contact use following code private void sendSMS(String first, String last, String id, String phoneNumber) { try { String message; message = insertName(first, last); if (message.equals(null) || message.equals("")) message = "\n"; String SENT = "SMS_SENT"; String DELIVERED = "SMS_DELIVERED"; PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new Intent(SENT), 0); PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0, new

java.lang.SecurityException: Sending SMS message: uid 10051 does not have android.permission.SEND_SMS

风流意气都作罢 提交于 2019-12-18 09:54:30
问题 guys i have problem with sms manager about sms scheduled...in manifest i used `<uses-permission android:name="android.permisson.SEND_SMS"/>` but i get this error...i don't know why...i show you my LOGCAT: FATAL EXCEPTION: main Process: com.example.alarm, PID: 31456 java.lang.RuntimeException: Unable to start receiver com.example.alarm.AlarmReceiver: java.lang.SecurityException: Sending SMS message: uid 10051 does not have android.permission.SEND_SMS. at android.app.ActivityThread

Android - how to make my app default sms app programatically

北战南征 提交于 2019-12-18 03:47:19
问题 I am developing an sms blocking app. Which is working fine up to Jelly-Bean. And its not working from Kitkat to Marshmallow. I searched on google and everyone recommending to take permission from user to make it default sms app of this phone by using . if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { if(!Telephony.Sms.getDefaultSmsPackage(getApplicationContext()).equals(getApplicationContext().getPackageName())) { Intent intent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE

How to send a SMS using SMSmanager in Dual SIM mobile?

只谈情不闲聊 提交于 2019-12-17 02:10:35
问题 Am using SMS manager to send SMS.For single SIM its works perfectly to send the SMS.but in dual SIM the SMS will not send.Is it possible to send the SMS from dual SIM,if possible means how can i select the Which SIM to send SMS.Can any one know help me to solve this issue. Single SIM working Code SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(ph_number, null, body, null,null); 回答1: I use this way to manage which sim to use for sending SMS even long message .. Its

automatically sms read not working in android

…衆ロ難τιáo~ 提交于 2019-12-13 09:23:28
问题 public class SmsReceiver extends BroadcastReceiver { private static SmsListener mListener; @Override public void onReceive(Context context, Intent intent) { final Bundle data = intent.getExtras(); final Object[] pdus = (Object[]) data.get("pdus"); for (int i = 0; i < pdus.length; i++) { SmsMessage smsMessage = SmsMessage.createFromPdu((byte[]) pdus[i]); String sender = smsMessage.getDisplayOriginatingAddress(); //You must check here if the sender is your provider and not another one with same

How to start an activity on a certain time?

我是研究僧i 提交于 2019-12-12 09:24:28
问题 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. 回答1: 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