I've developed and application for sending/receiving SMS messages.
I want to make my application as default for reading messages whenever message is received and is viewed from the notification area.
Thanks in advance.
You can receive the SMS and send it, but you can not stop other apps from receiving SMS. At least not without root.
The user has to choose which SMS-App he is using, and he needs to manually disable notifications from the default SMS-App.
Also you need to implement your own notifications if you want them to be shown on receiving sms.
Related
So i want to write a PoC app for an idea that I have. One of the feature that my app would do is send a text message (and perhaps receive delivery notification). Its not going to be an SMS app. Just a service which might run in the background and sends sms on some particular interval, unattended (of course with user consent).
i remember in some of android api release, Google took the decision that you can only send receive sms if you have selected your app to be "default" sms app ? I don't remember exactly.
So the question is, can my app (as a service) send an sms and receive delivery notification while not being an SMS app ?
Whenever I try to Google this question, I find how to send sms example with SMSManager and the code to send the sms but no where i could find this answer.
So the question is, can my app (as a service) send an sms and receive delivery notification while not being an SMS app ?
Yes. Since KitKat, there has been the concept of a default SMS app, which is what I believe you're referring to.
The main difference in the way SMS are handled as of that version is that only the default SMS app has write access to the Provider, but any other app can still send and receive messages as usual. If your app is not the default, any messages it sends will automatically be written to the Provider by the system.
Furthermore, the SMS_RECEIVED broadcast can no longer be aborted, so you don't have to worry about some other app intercepting incoming messages before your app gets a chance to handle them.
My application uses SMSs for data exchange between my android app and a device. The device will have a sim card in it, which will send a lot of regular SMSs to my App(i.e. to my paired sim no).
The issue is, a lot no messages are bothering my App users and they are getting irritated.
I know, from KITKAT 4.4, I can't delete/write a SMS from provider.
But can I just prevent notifications(specially voice), then vibration and then if possible status bar notification.
And I don't want to create an entire SMS application as a default SMS app.
I found a lot of question asking how to remove a SMS, but I just want to prevent it bothering the user by preventing/hiding notifications only.
And if above not possible then can I create a default SMS app that will only read/receive SMS but for other parts like MMS and sending SMS's, will pass that functionality to other apps like default messaging app in device or hangout app etc.
Because what I want is just to prevent notification when SMS comes from specific no, let it then show in default SMS app.
At least can i just stop notification sound(or mute it) for 1-2 seconds?
I have created a app that sends and receives Sms messages and displays some info to the receiver. I want to know if its possible to trigger a class from my app when pressing on New Sms Notification, instead of the default action which is trigger Messaging app. Thanks in advance
No, you cannot change what another app's notifications do, for blindingly obvious security reasons.
You are certainly welcome to display your own Notification, though.
Please take a look at using permissions in your Application to allow you to receive the SMS message (which it sounds like is what your trying to do):
http://developer.android.com/reference/android/Manifest.permission.html#RECEIVE_SMS
If you use this in your application, you can receive the SMS, or even select your app as the default application to receive all SMS messages.
Also, if you would like to send the SMS message as well there is the SEND_SMS:
http://developer.android.com/reference/android/Manifest.permission.html#SEND_SMS
Additionally, once you add this ability you can Create your Notification and provide it to the Notification center the same way hangouts does, you will just have to implement a receiver and send a notification when an SMS is received.
I am developing an Android App which receives SMS from a particular number constantly. I want my App to parse the SMS and display to the user accordingly. I wrote a broadcast receiver which intercepts sms and I can read the message sent from a particular number. However I do not want the user to get a push notification when the mobile receives an SMS from the number. Is there any way I can go about it?
From the android developer website, it seems from Android 4.4+ we cannot use abortBroadcast function to avoid broadcasting to the other applications.
Yes there is no way you can block the SMS going to other applications. But We have achieved this by customising the android framework which is proprietary implementation.
I am trying to make an SMS app in android. There are some messages which contents I want to keep hidden but as soon as I receive a message, android stausbar shows the contents of the message. How can I disable this programatically in my application?
Take a look at this question
Can we delete an SMS in Android before it reaches the inbox?
It shows you how to use a BroadcastReceiver to listen for SMS notifications and cancel them reaching other applications. This will allow your SMS app to display whatever notifications you wish, or don't.