I'm sure this is quite easy but I can't figure it out from the documentation.
I'm making an SMS application for Android, it sends and receives messages just fine.
However, when a SMS get's received the standard notification show up (which is what I want) but if I click the message from the notifications bar it doesn't show the 'Choose which app to open this with' dialog. It opens it with the standard SMS app.
If I install another SMS app (like Handcent) and do the same thing the dialog pops up and I'm able to choose between Handcent and the standard client (but not my app).
How do I tell the system that 'Hey! I'm also able to open SMS message'?
Thanks in advance.
Related
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.
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.
In the Android application that I'm developing there is a function that sends sms messages to given numbers automatically when the application is running. That function is working properly but after the messages is sent the cost for that messages prompts on a alert box. Normally when I send a message that alert box prompts. But in my application I want to disable it because it disturbs to my application. How can I achieve that.
But in my application I want to disable it because it disturbs to my application. How can I achieve that.
What you are describing is something unique to your device (or possibly device + carrier). They modified the SMS subsystem (or the SMS client -- I am not sure whether you are using SmsManager or not) to display this dialog. No device that I have ever used has displayed such a dialog when sending an SMS.
You are welcome to contact your device manufacturer to see if there is a way to disable that dialog, though I doubt that it is possible.
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.
I am sending an sms from my app and then i click the "Home" button. When i receive that sms (I am sending an sms from my phone to myself), a Notification will appear. When i click it, the screen (from where i sended it) will pop-up from background. So what i get is my default view for the notification, and behind it, the screen from where i sent the sms.
My goal here, is to when i click the notification, if the app is in background, i dont want it to be showed.
Thanks.
Edit1: if i do "this.finish()" right before the sms is sent, the app is not "poped-up". (witch makes sense).
Kinda stuppid, with 2 different phones this wont happen. The BroadCastReceiver, receives the context of the intent that sended the sms (at least for what i understood), if I am using the same phone, it will open the app that is on the background. 2 am here, gief me a break. :)