smsmanager

i want to send SMS from Android application using SMS manager

泪湿孤枕 提交于 2019-11-29 23:50:25
问题 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",

Trying to ID the SMS delivery confirmation

怎甘沉沦 提交于 2019-11-29 18:25:42
I am currently trying to get the confirmation for each sended SMS. I need to be sure that my SMS are send, so I used a BroadCastReceived to get the information : Intent sentIntent = new Intent(SMS_SEND); sentIntent.putExtra("key", idSms); PendingIntent sentPI = PendingIntent.getBroadcast(getApplicationContext(), 0, sentIntent, PendingIntent.FLAG_UPDATE_CURRENT); SmsManager manager = SmsManager.getDefault(); try{ manager.sendTextMessage(exp, null, sms, sentPI, null); put("sending " + sms); //Just a method to print in a textview use has a console } catch (IllegalArgumentException e){ put(

Android SMS delivery notification on failure: false positive

眉间皱痕 提交于 2019-11-29 12:46:52
My application sends a SMS from one device to another. The problem is that when the receiving device is switched off, I still get an OK notification intent. This is what I get when the SMS is really delivered (the 1st line) and when it is not delivered because the 2nd device is shut down: delivered: intent=Intent { act=SMS_DELIVERED flg=0x10 (has extras) } extras=Bundle{ pdu => [B@41a7a850; format => 3gpp; }Bundle delivered: intent=Intent { act=SMS_DELIVERED flg=0x10 (has extras) } extras=Bundle{ pdu => [B@41719ae8; format => 3gpp; }Bundle Is there a portable (not provider-dependent) way to

Abort SMS Intent on Android KitKat

懵懂的女人 提交于 2019-11-29 06:36:16
I'm currently developing an application that needs to deal with SMS only if it is an SMS expected by the application (same behaviour as Whatsapp on registration). I would like to abort the SMS Intent as it is not expected to appear in the SMS box. My question is : I know that Google changed a lot about SMS behaviour in KitKat, and now, even if my SMS is well parsed by my application, the SMS also appear in SMSBox, even if I call this.abortBroadcast(); in my SMS broadcast receiver. So is there a way to avoid those SMS appearing in SMS box without having to develop a complete SMS application ?

Android - how to make my app default sms app programatically

£可爱£侵袭症+ 提交于 2019-11-29 02:44:41
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_DEFAULT); intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, getApplicationContext().getPackageName())

How can I send sms messages in the BACKGROUND using Android?

亡梦爱人 提交于 2019-11-28 18:57:38
I am coming from iphone development where you cannot send an SMS in the background without asking the user to confirm the send. Can sms be sent in the background in android so that no user intervention is need? Send SMS with SMS-Delivery notification as toast. method call as below. sendSMS("98********","This is test message"); method signature as below. /* * BroadcastReceiver mBrSend; BroadcastReceiver mBrReceive; */ private void sendSMS(String phoneNumber, String message) { ArrayList<PendingIntent> sentPendingIntents = new ArrayList<PendingIntent>(); ArrayList<PendingIntent>

Trying to ID the SMS delivery confirmation

冷暖自知 提交于 2019-11-28 13:01:39
问题 I am currently trying to get the confirmation for each sended SMS. I need to be sure that my SMS are send, so I used a BroadCastReceived to get the information : Intent sentIntent = new Intent(SMS_SEND); sentIntent.putExtra("key", idSms); PendingIntent sentPI = PendingIntent.getBroadcast(getApplicationContext(), 0, sentIntent, PendingIntent.FLAG_UPDATE_CURRENT); SmsManager manager = SmsManager.getDefault(); try{ manager.sendTextMessage(exp, null, sms, sentPI, null); put("sending " + sms); /

Android SMS delivery notification on failure: false positive

僤鯓⒐⒋嵵緔 提交于 2019-11-28 06:31:06
问题 My application sends a SMS from one device to another. The problem is that when the receiving device is switched off, I still get an OK notification intent. This is what I get when the SMS is really delivered (the 1st line) and when it is not delivered because the 2nd device is shut down: delivered: intent=Intent { act=SMS_DELIVERED flg=0x10 (has extras) } extras=Bundle{ pdu => [B@41a7a850; format => 3gpp; }Bundle delivered: intent=Intent { act=SMS_DELIVERED flg=0x10 (has extras) } extras

Android sms manager not sending sms

青春壹個敷衍的年華 提交于 2019-11-28 01:15:52
问题 Am new for android . I want send sms after click send button first i have used sms manager api. package com.example.smsproject; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsManager; import android.view.View;`enter code here` import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class Page2Activity extends Activity { Button button; EditText

Abort SMS Intent on Android KitKat

半世苍凉 提交于 2019-11-27 23:54:32
问题 I'm currently developing an application that needs to deal with SMS only if it is an SMS expected by the application (same behaviour as Whatsapp on registration). I would like to abort the SMS Intent as it is not expected to appear in the SMS box. My question is : I know that Google changed a lot about SMS behaviour in KitKat, and now, even if my SMS is well parsed by my application, the SMS also appear in SMSBox, even if I call this.abortBroadcast(); in my SMS broadcast receiver. So is there