How to get Notified before SMS is Sent in android - android

Is it possible that i can get Notification when Handset sends SMS and get the receiver's Number before the SMS is sent. I used BroadcasrReceiver to get notification of Incoming Message.But in same way i am not able to track outgoing SMS message by using "android.provider.Telephony.SMS_SENT"
Please Help....Thanks in advance.

I dont think such is possible, once the phone has granted the application the permission to send SMS, there is little or nothing you can do about it as the user.

Related

Sending an SMS and waiting for response before sending another SMS

I am trying to make an android application which sends SMS messages automatically.
I want to send the first message and after my Broadcast Receiver receives confirmation that the service was sent, I want to send the next one and so on.
Can anyone tell me how can I achieve this? I tried to create an AsynkTask to send the SMS but I cannot register a broadcast receiver. What approach should I use to accomplish this?
Thanks.
Basically you cannot. Only if your application is accepted as default messaging application by the user then only you can send SMS.
Please refer here and here.
UPDATE:
If you are sending SMS and the version of android is supporting SMS sending, follow this link, it has the answer.

SMS message is not present in inbox after receiving in Kitkat

I'm creating little sms app, and after receiving it with my Broadcast receiver it is supposed to be present in inbox and it should be accessible to other sms apps as well, but it is not. It looks like no message was received at all. This issue occurs only when my app is default SMS app. Do I need to manually add received SMS to inbox after receiving it?
Do I need to manually add received SMS to inbox after receiving it?
Yes. The default SMS app is responsible for writing incoming messages to the Provider.
Reference

Is there a way to get sms details in android before sending the message?

So basically I am looking to get the string inside of the sms message before the message is official sent... is there a way to do that... So for example I am texting my mom and say "hi" is there a way to pull that "hi" automatically send it off to a program and then send the message??
Sorry there is no way to do so before sending SMS through native SMS composer, yes you can get SMS details but only after sending it.
Once you send SMS, system will be notified by using Broadcast receiver.
Yes Its possible to get message details if you define your own SMS layout and then sending SMS through it other than opening native SMS composer.

With SMS receiver - how can I both abort propagation and still have it saved to content provider?

I'm writing an application that is intercepting some of the SMS mesasges and displays special notifications for them. In this light there is really no need for an additional notification in the status bar or on the screen from the "standard" SMS service. But just to be safe I want the message to not be lost and still show in user's message history.
Is there a way to do this?
I have to guess how you handle your SMS Received Broadcast, but i think you call abortBroadcast(); after you received the sms.
Otherwise the Broadcast would be forwarded to the next receiver, for example the stock sms app.
If you abort the Broadcast with a higher receiver priority, your app will interrupt incoming sms and the stock sms app is not able to save them into the history.
I hope this will help you.

Android and consume SMS

I write application which will get data from received SMS. This is data only for application and I dont want to user can read this message. Is possible to consume SMS just after get data from them to prevent user from reading this SMS? Thanks for any help.
You will need a sms receiver see http://davanum.wordpress.com/2007/12/15/android-listen-for-incoming-sms-messages/
Maybe you need also to delete the received sms.
Yes, this is easy to do. See my answer here for how to do this:
SMS receive with no notification
Once you've confirmed that the SMS is one of your special ones, you just need to call abortBroadcast() to stop it going into the user's inbox:
// Stop it being passed to the main Messaging inbox
abortBroadcast();
You should also be aware that the SMS receiver will not intercept SMS messages sent to the user's Google Voice number, as by default those messages will be downloaded over the data connection and displayed by the Google Voice app. If their Google Voice number is configured to forward the SMSs to the phone then those will be handled fine by the SMS receiver.

Categories

Resources