Under what circumstances does Android require user intervention to send a SMS? - android

I'm developing an app that will send very infrequent SMS messages from a foreground service. By very infrequent we're talking a few times per year at most, if the app is not severely misused by the user themselves.
I tested it the other day on a real device, and up popped a dialog that said something along the lines
AppName is trying to send an SMS.
Do you want to allow this?
Accept Decline
[ ] Never ask again
I don't remember the exact phrasing, and I haven't been able to reproduce it. I wouldn't swear on it, but I'm fairly certain it was on a device running Android 4.4.4.
This was the first time the app tried to send an SMS on this device, so I don't really think that it is related to SmsUsageMonitor.isUnderLimit(). Are there an other security checks and whatnot that would apply to sending SMS from a foreground service (including all versions of Android, not just 4.4.4)?
SmsUsageMonitor seems to do some checking for "premium" numbers, and might possibly require some form of user acceptance in case an app tries to send a message to such a number. If this is the case, is there any way to "pre-approve" my app for sending to any number - including premium ones
- once and for all? Or could manual user approval still be required some time in the future, if for example a new recipient number (which might be a premium number) is used?

It seems I was able to reproduce this after changing the package name of the app (uninstalling didn't help). This is indeed related to premium number - or rather what SmsUsageMonitor considers to be premium numbers.
For me, in Sweden, it seems like numbers that have 5 or fewer digits and are not emergency numbers (like 112) are considered to be premium numbers. This is somewhat backed up by Wikipedia on Short Codes
Sweden
Codes are five digits in length.
This is the dialog that pops up. After checking "Remember my choice" and clicking Send, the dialog doesn't appear anymore. The setting can be changed in App Info, where there is a setting called Send Premium SMS.

Related

Hiding the phone number when calling from iOS or Android App

This might not be an appropriate question for StackOverFlow. If not please recommend me where I can post this question.
We are in the process of developing an application where the customer can call the vendor and the vendor can call the customer. But for privacy reasons we don't want to expose the phone numbers of the customers to the vendors and vice versa.
What are some recommended solutions for this problem?
It's not possible, the URL Scheme requires a number and it is show on the screen while calling.
as you can see here
Maybe, you may have to create something more complex like Skype.
Unfortunately that is not possible as of now. You could hide the phone number by replacing each number as an asterisk (*) in your app.
However, when vendor or customer taps on the phone button to call, then phone number is passed to the device Operating System to call, then this number will show up in the calling list.
In addition to that, your app most likely will not be allowed by Apple reviewers, because user needs to see what phone number he is calling. He might be punished if he keeps calling this secret/scripted phone number which might be 911. That is another serious issue may rise.
My recommendation is to have chatting system, or implementing VoIP(voice over IP) like whatsup or viber style calling within the app. It requires exhausted implementation.

Is it common practice to ask users whether they wish to receive push notifications?

I'm new to the Android platform. Apple requires every iOS app to ask for and confirm push notifications, but I have not noticed any apps that I've downloaded on my new Android phone prompting me if I want to receive push notifications. It just automatically registers me for them. Is this normal Android convention, to automatically register users for push notifications, assuming they can disable them later?
In my own Android application, should I be prompting users and asking if they want them before I register them? Obviously it would be the polite thing to do to ask permission before signing them up for push notifications, but if that's not common practice I see no reason to potentially lose some receivers of them.
Making decisions for the user is actually a strong Android guideline. Here is a list of the "Android Design Principles", written by Google. As you can see "Decide for me, but let me have the final say" fits the behavior that you've mentioned.
Some things to keep in mind when discussing Android notifications:
Users can disable your app's notifications in their OS settings. If they really don't want to hear from your app, they'll disable notification's there.
User context. You don't know what context the user is installing your app in. Users who are on a crowded train, relaxing on their day off, hanging out at a friend's place, or maybe waiting for a flight, all want different things out of your app at the time of installation. The guy on a crowded train is going to want your app to work immediately, with very minimal setup, while the guy relaxing at home may not mind a long setup process.
Your setup process can have a significant impact on your user retention. This Forbes article briefly discusses intrusive setup forums and their impact on app uninstalls.
At the end of the day however, it all depends on the needs of your audience. If you're targeting professionals, then they might be willing to put in some extra time up-front if they believe your app could help make their job easier. If you're targeting a casual gamer, you'll want them to get in and rolling as fast as possible. It's up to you to decide how best to serve your audience.
Here's a video from Google I/O 2013 that discusses the Android Design Principals in greater detail.
Hope I was able to provide some insight.
Sadly, it does not appear to be a very common practice. I've installed several Android applications that will randomly give me a notification in the middle of the night. I've recently made a new habit of disabling notifications for every new app that I install unless I really want notifications from it. I think your application would result in a much better user experience if you prompted them for notifications. You could also offer configurations for which notifications they wish to receive. If other apps were like this I might choose to receive some notifications instead of globally turning them off.

Remove or Consume pop up coming after sending SMS

I have an android app which needs to keep sending SMS. My problem is that whenever we send a message we get a pop up showing (your SMS charges and your curent talktime balance in phone). When i send many SMS these pop ups keep getting accumulated one over the other which is undesirable for me. I need a way out to either remove or somehow consume these pop ups.
Any ideas ??
a pop up? Do you mean a toast? or notifications accumulating below the status bar?
You'll have to pardon my seemingly simple question. In the US, I've had multiple Android phones on at least two carriers, and I don't get any such message in any form, but may be that's because I've always had unlimited texting so additional texts do not cost me anything.
I bet you're talking about notifications accumulating in the status bar. So if your carrier is doing that, take a look at the code in the "API Demos" > App > Notification > Status Bar
There in the callback attached to the "Clear Notification" button, you'll find the code you're looking for.
And if I could suggest something, I know that many notifications accumulating on top of each other can be super annoying, but if you can try to consolidate all those notifications into one notification at least with the running count (unless your user explicitly opts out from being notified). This way, you still communicate to the user the most important part of the information - how many texts in total his phone has been sending so far, without completely overwhelming him with many-many notifications about basically the same event happening over and over again.
For those who don't know, "API Demos" is a free application you can download from the Market. And there may be several to choose from, so just pick the one with five stars next to it, but "API Demos" is also the same sample code that comes with different SDKs when you download it with the SDK Manager, and you can access that code when you create a new Android Project with the New Android Project... wizard from within Eclipse and then select the radio button "Create Existing Project from Sample" (or something like that, I don't have Eclipse in front of me, so the wording may be slightly incorrect). And of course, if you don't use Eclipse, you can always find that sample code through the Sample code directory itself.
As a potentially more elegant alternative, or may be just in case your carrier is indeed crude enough to pop up an actual modal dialog every time a text is sent, it may be that your carrier is using a broadcast receiver to trigger those notifications or those dialogs, so if that's the case, and hopefully the carrier isn't using "100" as a priority for its receiver, it may be possible for you to register a receiver with "100", and then kill the broadcast before it propagates to the other receivers. But of course, that's assuming that your carrier designed it that way for you.

How to update the settings Through SMS

I am developing one GPS based application. in that i given few default values to user those are phone number which will used to make a phone call. and server address which is used to sent the location data to server.. In this I got 2 major and critical problems..
1) I have hide that default values in regular menu and that should display when user presses some key or combination of keys then only it should display.
2)When ever the Default phone number and server address is changed at provider side that should be updated at user side that should happen through SMS from a specific number in a encrypted format by accepting that SMS those values has to change
Please Any body knows about these things help which are very very very useful to me
Thanks for reading
Lots of good info here.
Having used SMSes to communicate with apps in the past, I highly recommend finding another way if possible. The messages coming in are often gibberish to the user, and practically never contain any information that the user needs to know about. They're confusing and they clutter up the user's phone experience.
I'd recommend using WAP pushes or periodic device-side checks instead. If you have to use SMSes, you may want to consider using the SMS content provider to delete the messages after your application responds to them. It'll still be annoying to the user, but at least you won't be leaving behind garbage in their messaging app. Be aware though that the SMS/MMS content providers aren't published, which means that they're not guaranteed to work, manufacturers can modify them however they want, and they could be phased out in a future SDK release.

How to catch an incoming text message

I want to be able to control incoming text messages. My application is still on a "proof of concept" version and I'm trying to learn Android programming as I go.
First my application need to catch incoming text messages. And if the message is from a known number then deal with it. If not, then send the message as nothing has happened to the default text message application.
I have no doubt it can be done, but I still have some concern and I see some pitfalls at how things are done on Android.
So getting the incomming text message could be fairly easy - except when there are other messaging applications installed and maybe the user wants to have normal text messages to pop up on one of them - and it will, after my application has had a look at it first.
How to be sure my application get first pick of incoming text messages?
And after that I need to send most text messages through to any other text message application the user has chosen so the user can actually read the message my application didn't need.
Since Android uses intents that are relative at best, I don't see how I can enforce my application to get a peek at all incoming text messages, and then stop it or send it through to the default text messaging application.
Espen,
The answer to this is multi-part. Understand first that our company has resolved this problem, but the solution is temporarily proprietary, so I will answer what I can without causing conflict either here or for my company.
1) You can never insure that your App ever gets first pick. What you can do is make your processing "fast enough" that is does not matter.
2) Intents ARE an absolute if you force the issue. Our company uses a concept called intent routing. This insures that the data is sent to the appropriate app. The most basic idea is that when you receive the SMS, you create a New Intent (not the same one) and send it to the class directly. This has some special considerations, but should give you some direction.
Unfortunately, without violating my company's confidence or stackoverflow's policies, I cannot say anymore publicly until the solution is made public (within the next month).
FuzzicalLogic
Retriving all incoming messages is just setting up listener, you can do it easily see here
and after that, its fine if you are at do nothing phase, but in case you want to prevent sms to go into the native messaging app it is not advisable to prevent user.
better you wait for some time and then delete the same from SMS database.

Categories

Resources