sms

Sending SMS using CTMessageCenter (iOS 7)

偶尔善良 提交于 2019-12-21 05:29:29
问题 I am trying to send sms programmatically using private API. My phone is not jailbroken. BOOL success = [[CTMessageCenter sharedMessageCenter] sendSMSWithText:@"test 1234..." serviceCenter:nil toAddress:@"0777888888"]; if(success){ NSLog(@"Message SENT"); }else{ NSLog(@"Message not SENT"); } This code always prints "Message not SENT". Can anyone help me ? 回答1: I guess, you have to write the telephone number in E.123 international notation. So add plus sign and country code. For a phone number

How to identify which SMS has got Delivery report in Android

纵然是瞬间 提交于 2019-12-21 05:17:08
问题 My application retrieves records from sqlite database and SMS to other application by merging the records based on the size of the record, i am intruble to identify which messages have got the delivery report and which does'not . i am using BroadcastReceiver on reciveMethods but unfortunately i can't understand how to identify . i would love if any one of you suggest me the how to handle this problem. or any other better way public class MessageMangerActivity extends Activity { private String

How to access sms time which I have received in inbox?

偶尔善良 提交于 2019-12-21 04:32:08
问题 I am able to read message from the inbox from this:-- Uri uriSMSURI = Uri.parse("content://sms/inbox"); Cursor cur = getContentResolver().query(uriSMSURI, null, null, null, null); i access date from this:- date = cur.getString(cur.getColumnIndexOrThrow("date")); But now problem is that it gives current time not Message Time from inbox. Sorry for Bad editing & any idea will be appreciated. Thanks in Advance! 回答1: Use this code: ContentResolver contentResolver = getContentResolver(); Cursor

Change SMS App Default on Android 4.4.2

大城市里の小女人 提交于 2019-12-21 03:16:08
问题 I would change default sms app on Android 4.4.2 I use this code: Intent sendIntent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT); sendIntent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, context.getPackageName()); startActivity(sendIntent); How can i solve this? And how can i ask to change default sms app with my app? My Receiver: <receiver android:name="receiver.SMSHandlerReceiver" android:permission="android.permission.BROADCAST_SMS" > <intent-filter> <action android:name=

How to prevent incoming SMS from reaching the inbox?

江枫思渺然 提交于 2019-12-21 02:58:30
问题 I'm working on a simple app that receives, but not handles sms messages. It checks each incoming sms for a specific keyphrase. If the sms contains that keyphrase then it responds accordingly. If the keyphrase doesn't exist, then my app does nothing. I have this much working. I was wondering if there was a way to prevent the default sms app on the phone from receiving the text only if my app finds that keyphrase. Thanks for the help Andrew 回答1: in broadcast receiver set android:priority="100"

international Count sms characters

大兔子大兔子 提交于 2019-12-21 02:56:20
问题 I found Count characters/sms using jQuery, but it does not support international characters such as Chinese, Japanese, Thai, etc. var $remaining = $('#remaining'), $messages = $remaining.next(); $('#message').keyup(function(){ var chars = this.value.length, messages = Math.ceil(chars / 160), remaining = messages * 160 - (chars % (messages * 160) || messages * 160); $remaining.text(remaining + ' characters remaining'); $messages.text(messages + ' message(s)'); }); Here are some examples of

Broadcast Receiver Still Running after app close - Android

谁说我不能喝 提交于 2019-12-21 02:54:16
问题 I'm using some code from this tutorial on how to receive SMS messages: The code works perfectly, and does exactly what I want. I am having 1 issue with it. I want my app to run in the background, but when it's closed I want it to stop intercepting SMS messages. My question is, why is my app still intercepting SMS messages after it's been closed? I guess I have to find a "on close" handler and close the Broadcast Receiver then. (If there is a "on close" event handler..?). If anyone can provide

Send Sms With Genymotion [closed]

不羁岁月 提交于 2019-12-20 20:28:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm new android developer and I want to Test an app works with sms service . i want to test my app with Genymotion emulator but I cant find a way to send message ! Is there any way to send and receive SMS with Genymotion emulator ? 回答1: No, for the moment, you cannot send/receive SMS with Genymotion. This is

How to send SMS programatically in a professional and reliable way? [closed]

流过昼夜 提交于 2019-12-20 15:26:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . for a project I'm working at I need to send SMS messages in a reliable way as this is a production application. The problem I have is that the application runs on the cloud and I can't use extra hardware like SMS gateways. The provider I'm using does not offer the typical mail to SMS gateway and I don't find it

Check if an SMS is actually sent

本秂侑毒 提交于 2019-12-20 15:24:07
问题 In my SMS application I am sending SMSes using an SmsManager . After that I want to display a Toast saying "Message sent" or "Message not sent" . How could I check if the message was actually sent? Could be like a no connection issue? or no SIM? How could I detect these? 回答1: you can set listeners for both for delievery and sending my method is PendingIntent sentPI = PendingIntent.getBroadcast(mContext, 0, new Intent(SENT), 0); PendingIntent deliveredPI = PendingIntent.getBroadcast(mContext,