SMS can be abortBroadcasted on Android 5 - android

It's been a while that I'm surfing the net in order for finding a way to disable the broadcast for incoming sms-text, but mainly it's said that on android 4.4+ you can't do this because it's feature has been removed. But I can show you this is Wrong. In a banking application (targeted android 4.9) in this link
you can find an application which sends out and receives sms without having other apps noticed the transmition of sms. you can download the app here.
Please help me with this issue. how can I Receive sms without having other apps notified ?

They're most likely using data SMS, also known as port-addressed SMS. In fact, a quick, crude unzipping of the APK, and a short perusal of the manifest shows that they have a Receiver registered for the DATA_SMS_RECEIVED action on port 7442.
Data SMS are not handled by the Provider (apart from collation), and only apps listening on that specific port will receive them, so they won't appear in the platform app, or pretty much any other SMS app.
So it's not a matter of the SMS_RECEIVED broadcast being aborted, or the SMS_DELIVER broadcast being intercepted. It's just not regular text messaging.

Related

Can I send an SMS from a service?

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.

Receiving sms from custom application

I am working on an application in which i am sending an sms from a device to itself. Now i want to read it from my application. I know how to read it but i also read from the developer page that only one (default) sms application will be able to read the sms. If that's the case how can my application can read the sms that is sent by my application.
To Receive SMS i am using broadcast receiver which is registered in the manifest.xml.
-THANKS
...read from the developer page that only one (default) sms application will be able to read the sms.
Nope. Your app can still both receive and read incoming SMS in KitKat and above using the standard methods (barring any alterations to the standard behavior by the vendor). The changes to the SMS API are a little confusing, but it mainly boils down to the fact that non-default apps cannot write to the Provider. Any app with the RECEIVE_SMS permission can still get messages as they arrive. Also, this broadcast can no longer be aborted, so any and all Receivers registered to do so will receive it. Furthermore, any app with the READ_SMS permission can still read messages from the Provider. As mentioned, they just can't write to it to save messages or update their status.
As testimonial, my device runs KitKat 4.4.4, and I use it to send messages to itself all the time for testing, all from non-default apps.

KitKat - Management of SMS

I'm developing an application that works like an SMS BlackList / WhiteList. It is not a SMS application right now.
The goal is:
If the number is in Blacklist, it prevents the user for receiving / sending sms and it does not appear on his sms applications.
If the number is in Whitelist, the user can do everything he wants.
With some special cases, messages that have been blocked are stored in our database to be send after few hours;
To sum up my app needs to be able to:
Block SMS (before any other app can deal with it, like a popup sms app)
Send SMS
So far, the component works fine with android pre KitKat.
The idea is to deal with broadcast (for received sms) and observers (for sms to send).
By the way, the KitKat SMS handling is mainly different. As I know, we kind of need to be the default sms app to send message.
My questions are:
Do I really need to be the default SMS app to send / observe messages ?
Do I have to implement a kind of basic SMS app or is there another way to send SMS with SMSManager for example ? (http://android-developers.blogspot.fr/2013/10/getting-your-sms-apps-ready-for-kitkat.html)
Do I really need to be the default SMS app to send / observe messages ?
Do I have to implement a kind of basic SMS app or is there another way to send SMS with SMSManager for example ?
No. Any app with the SEND_SMS permission can still send messages using the SmsManager's standard methods, and the writes to the Provider will be taken care of for you, if and only if your app is not the default SMS app. If yours is the default, it is responsible for the writes.
Any app with the RECEIVE_SMS permission can still get the SMS_RECEIVED broadcast and read the message from the Intent. Also, the SMS_RECEIVED broadcast cannot be aborted, starting with KitKat, so there's no real way to block any app listening for that broadcast from receiving incoming texts, even if your app is the default. However, apps that are compliant with the recommended behavior of SMS apps in KitKat or above will disable any processing of incoming messages if they're not the default. That is, if your app is default, other apps shouldn't care about incoming messages.

How to change default app programatically?

I have an app that has device admin rights. My app monitors received SMS's and passes the content through some logic. Can i change the default SMS app to my app programatically . My app checks for spam messages so it needs to read/write/update SMS db. I want a fix for kitkat.
I just noticed that the incoming SMS notification on my app are no longer notifications for new SMS that are received , but instead are "new Hangout message" notifications that are caused by hangouts receiving the incoming SMS. So my app is also not able to receive incoming text messages with SMS_RECEIVED.
Google's Android Developers Blog post about the new SMS API in Kitkat, said that nothing would change for apps using just SMS_RECEIVED and don't try to write the SMS to the SMS Provider.
1 I always believed that the SMS_RECEIVED broadcast is abortable. But the Android 4.4 APIs site says something different: "…when a new SMS arrives by listening for the SMS_RECEIVED_ACTION broadcast, which is a non-abortable broadcast…"
Can i change the default SMS app to my app programatically
Not directly. You can prompt the user to change the default SMS app.
My app checks for spam messages
Repackage your code as a library and license it to SMS clients.
So the Pebble app is also not able to receive incoming text messages with SMS_RECEIVED
Possibly the Pebble app is simply having other problems and is crashing before it notifies the Pebble. Or, possibly the Pebble app is updated for Android 4.4 and, since it knows it cannot stop the Hangouts notification, simply suppresses its own.
Google's Android Developers Blog post about the new SMS API in Kitkat,said that nothing would change for apps using just SMS_RECEIVED and don't try to write the SMS to the SMS Provider
That is not what this blog post says.
I always believed that the SMS_RECEIVED broadcast is abortable
This undocumented, unsupported broadcast had been an ordered, abortable broadcast through Android 4.3. That is no longer the case with Android 4.4, as you can tell by reading the aforementioned blog post:
Note that—beginning with Android 4.4—any attempt by your app to abort the SMS_RECEIVED_ACTION broadcast will be ignored so all apps interested have the chance to receive it.

Android SMS intercept without notification icon or WAP-PUSH messages

Is there a way to intercept an SMS with BroadcastReceiver as for example here
but without showing any notifications to the user and immediately deleting the message that contains for example some keyword
EDIT:
What I need is to have some communication between android phones, one to one, and I thought that sending SMS messages would solve the problem, but the SMS notification are not needed for that, maybe the WAP PUSH messages would better for that but I have no idea how to send them from android phone.
If someone has any idea that would help, please put it here :)
Some guys from the Ericsson lab presented their push solution during the droidcon this year (with some additional reasoning why push is good).
Here's the link to their site:
https://labs.ericsson.com/apis/mobile-java-push/blog/push-android-droidpush-droidcamp
I would recommend PUSH or a web service to do the task your requesting.
WAP is a SMS message with a URL, it's goal is to allow users to download content from the web, kinda like a MMS message but for phones without MMS capability. Usually it's a premium message (Meaning the end user pays for these).
As for SMS, I don't think you can delete these from the phone without the knowledge of the user. Think legal on this. Would you want to receive and send SMS messages without your knowledge? SMS can also bill your phone so I'm thinking legally I would recommend avoiding this.
Another note if you're going to use SMS is that you would need a short code and a aggragator. Even if you have the short code and aggragator you still need the users permission to send reoccurring messages to their phone via application/phone.
I would recommend these links for reading:
Android Push Notification
http://www.anddev.org/calling_a_web_service_from_android-t348.html
Web Services
Yes, you could intercept Android SMS without notification icon.
Here is the solution: Can we delete an SMS in Android before it reaches the inbox?
check out Xtify - similar to C2D for Froyo with the ability to push intents but, Xtify does a lot more and does it across Android, iPhone and Blackberry.
xtify uses an SDK for easy implementation and has a web console and web service to configure messages to one, some or all of your users.
you can create rules that determine when a message gets sent – you can even push notifications using location as the trigger as the SDK runs in the background and provides access to persistent location.
reach out with questions to business#xtify.com

Categories

Resources