I write sms messenger and have one problem. When user reads sms from my app and deletes them from my app, other apps and notification bar still show that one or more sms as unread. And when the user try to open sms, for example, from notification, other sms messenger didn't show unread sms beacause it was deleted from base from my app.
Is there any way to refresh sms apps and notification that would not show that sms not read?
Thanks!
I don't think there is a way to do this. Furthermore it shouldn't be you job to care about this, it's the job of the other apps to show always the most current data.
But you can show some advised to the user when he starts your app for the first time. GO SMS for example advises the user to turn off the SMS notification of all other SMS applications on the device. I think the reason for this is similar to your issues.
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.
Hello all i will explain my question a little more. I'm not native english speaker. So maybe my question is on the internet but when i search i only found something i already know.
I have a Xperia U with the illumination barre. I use it as a notification for sms. I already know how to receiver SMS and the event of unlock screen
What i will now is 2 thing.
1- Possibility to know if the last sms was read by the user or not(My apllication is just a notification center and not a sms handler so the sms reading is doing by official app or user app like gosms)
2- Possibility to know if phone is already unlock, i will remove notification if it is.
I'm not very clear but i find this difficult to explain if you don't undestand the question say it i will reformulate it.
Possibility to know if the last sms was read by the user or not(My apllication is just a notification center and not a sms handler so the sms reading is doing by official app or user app like gosms)
There is no concept of Read in SMS. You can get a delivery notification for when it reaches the user's device, but you can't tell if the user read it or not.
Possibility to know if phone is already unlock, i will remove notification if it is.
You will need to dynamically register a BroadcastReceiver for ACTION_SCREEN_ON and ACTION_USER_PRESENT broadcasts.
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.