disable system alert boxes in android - android

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.

Related

capture the Sms exactly before being sent

I’m trying to develop an application to do some manipulation (compression and security matters) on the outgoing Sms regardless of the composer application. The main challenge is that I cannot capture the Sms exactly before being sent. For instance the user compose the message body using Go Sms Pro and when the send button is pressed , right before the sms is actually sent we capture it and do the compression and security matters on .
Any solution or replacement idea appreciated.
Starting with KitKat, the SMS content provider has been opened up (finally): http://developer.android.com/about/versions/android-4.4.html
To make this work with previous versions of android, you could set up a content observer to watch content://sms/, query the appropriate tables in that database, and then do whatever you like to erase the message before it goes out. This is just a thought mind you, but whatever you do will likely involve using this method.
This is not possible, short of via your own custom build of the Android OS. You have no ability to intercept, let alone modify, the calls from an arbitrary app via SmsManager to the OS to send an SMS message.

How to programatically disable the Android Status Bar?

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.

How to suppress android system popups for outgoing sms notifying user's current account balance for a pre-paid network plan?

My app is able to successfully intercept incoming SMS with a special code. Increased the priority in the manifest intent filter to suppress the broadcast for such special messages using abortBroadcast(). On receiving such special sms the app is supposed to send back an SMS with some info(lets say current location). I have been successfully able to achieve this as well.
The problem is, few of my customers might be on a prepaid plan. This means everytime they send an sms, a system popup comes up telling the remaining balance in their account.
Suppressing the incoming sms broadcast has solved half the problem because my customers dont want to receive these special sms in their inbox nor they want the notification. The problem that remains is how to suppress the outgoing "remaining balance" system popups? Is there a way(for non rooted android) to suppress these notifications?
One way is yes go to setting and manually disable it. That will disable it for all outgoing sms. I dont want my users to do that. I want to programatically suppress only those popups that are a result of sms sent by my app.
I am trying to add this feature for a legitimate use and my customers will be aware of this behavior. I am ok if the customer has to agree to any such settings during the install time(just like device admin policy manager or other usual app permissions).
Any suggestions?
I installed Balance Update / USSD Blocker from Play Store.... so far seems to be working. Available here
https://play.google.com/store/apps/details?id=com.melkote.quietbalance
Is there a way(for non rooted android) to suppress these notifications?
AFAIK, there is nothing in Android for this. Most likely, this popup was added by device manufacturers and carriers for their specific plans. You are welcome to talk to each device manufacturer and each carrier to determine if they offer any sort of API for adjusting this behavior.

Trigger 'Choose default app' dialog for SMS

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.

Android: Is there an onSMSSend event?

I've got an idea for an Android Application, however I am unsure if it would work. Essentially what I want to do is "intercept" all text messages sent from any SMS App and make modifications to them.
For example, say I write out the following SMS:
Hi {Name}, how are you today? Can you tell {Boss} I'll be 15 minutes late today.
The onSMSSend function in my application(assuming it is currently running in the background) would then be able to edit the content of the message(Eg. Replacing variables with ones defined in the application), and then send it on to the recipient.
Is Android able to provide this functionality?
No it is not. Android may be able to inform you after an SMS was send. But there is no way to intercept a message that should be sent and apply changes to it on a non rooted phone.
What you could do is to write a new messaging App that allows the user to type a message, choose a number and send the message. Now you have full control over the message that is send but building a replacement for the sms app is a fair amount of work.

Categories

Resources