Block SMS Push Notification of a particular number in Android - android

I am developing an Android App which receives SMS from a particular number constantly. I want my App to parse the SMS and display to the user accordingly. I wrote a broadcast receiver which intercepts sms and I can read the message sent from a particular number. However I do not want the user to get a push notification when the mobile receives an SMS from the number. Is there any way I can go about it?
From the android developer website, it seems from Android 4.4+ we cannot use abortBroadcast function to avoid broadcasting to the other applications.

Yes there is no way you can block the SMS going to other applications. But We have achieved this by customising the android framework which is proprietary implementation.

Related

Android App To Programmatically Receive Incoming SMS Message and Reply Back With A Response

I am hoping to receive some guidance with the issue described below, I am trying to understand if current version of Android OS will allow me to achieve the following:
Background:
I have developed an app and using a basic Android phone as the control panel to manage a peripheral devices connected to the phone / app by wifi and Bluetooth
I want to be able to periodically send an sms to the app / control panel and as the app will be the only app on the device and always running i want the app to:
Detect the incoming SMS
perform certain diagnostic / queries upon detecting the incoming sms
retrieve specific diagnostic values
reply back to the number that sent the sms with a custom message containing diagnostic information in point 3.
The Control panel itself displays a splash screen and is public facing.
Achieving points 2-3 above are not the issue.
I am needing for points 1 and 4 above , the receiving of the sms and replying back with a response to occur without there being any visual sign on the display itself the the above is occurring.
Its my understanding that the above functionality to programmatically receive and sms and send a reply was achievable in earlier version of android.
I am told that at some point later version were modified to prevent the above from being possible to perform programatically.
Thanks in advance for any advise provided
Sending SMS is big Task.
Only default SMS app can send the SMS in android.
To set the app as default messaging app we need to get the sms send and receive permission and register as messaging app in google play store (if you are planning to release it to play store or already released)
In short you have to build the full-fledged Messaging app to send sms.

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.

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.

Check delivery report of sms sent from other application

Can we track the messages sent from other application? I mean, when user send sms by android default sms application (or other sms-managing application), can we track the sms situation and make a notification in our application when sms delivered?
No, this is not possible, unless that other app specifically has an API to support such monitoring.

How to make my application as default launcher

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.

Categories

Resources