Android sms notification issue - android

I'm having some trouble with my app. I'm inserting programmatically sms to test into inbox folder,
but i cannot "simulate" original sms notify. I don't want to make my own, but i want to call the original one. The message is in inbox folder, with status unread.
Otherwise, is possible to refresh "sms inbox", such a way to recognize the unread sms and provide to notify themself?
Thanks

I don't want to make my own, but i want to call the original one.
There are thousands of Android device models. These ship with dozens, perhaps hundreds, of default SMS clients. In addition, users can install their own SMS clients.
A few, at most, might provide some sort of documented and supported API by which they would trigger this notification. You will need to contact each SMS client vendor directly and ask them if they offer such a capability.
Moreover, what you are trying to do (modify the SMS inbox) does not work on Android 4.4+ unless you are the user's chosen SMS client, in which case it is your job to show the notification.
is possible to refresh "sms inbox", such a way to recognize the unread sms and provide to notify themself?
Again, a few SMS clients, at most, might provide some sort of documented and supported API by which they would trigger this notification.

Related

Modifing SMS before sending in android

I was wondering if it's possible to modify the SMS before sending it in Android, but not only if it's send by my application, but also if it's being send by other applications. My application would work in the background and wait for an sms sending, and when that occurres it prevents it from doing so, modifies it and sends it.
For example, a default SMS application(built-in or otherwise) sends an sms to someone and I want to catch it before it does, modify the body(like add new receiver or some text inside message itself).
I think that this: Can I modify sms_body before sending SMS with built-in SMS Application? might be an answer to my question, but I'm not sure, and it's kind of old.
Let me know if I was unclear in something. Thanks.
Let me try with simple example-
Its just like you have an Account in a Bank and you wish all deposit should come in your Account. Here Account refers to your App and Bank refers to your Mobile device.
In a short, you can't achieve this on a non-rooted device. Yes that is possible on non-rooted device if user like to send his messages from your App, then surely you can modify messages written by user.
not only if it's send by my application, but also if it's being send by other applications
This is not possible, except perhaps on rooted devices.

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 send an SMS in Android Kitkat from non-default app without writing to SMS Provider

My Android app uses SMS to silently send out notifications. Prior to Kitkat these notifications were not recorded into the SMS Provider and hence did not appear in the user's conversation lists. This is the app's desired behavior.
With the Kitkat SMS changes (refer SmsManger documentation quoted below) these messages are still being sent but are now automatically being written to the SMS provider and thus appearing in the user's conversation lists. This is undesirable for my app.
Beginning with Android 4.4 (API level 19), if and only if an app is not selected as the default SMS app, the system automatically writes messages sent using this method to the SMS Provider (the default SMS app is always responsible for writing its sent messages to the SMS Provider). For information about how to behave as the default SMS app, see Telephony.
It sounds like I could prevent the automatic writing to the provider by making my app the default and then not writing to the provider. However, this would be a terrible user experience in the context of my app, so I would only consider it as an absolute last resort.
My question is then - is there a way to silently send SMS in Kitkat without my app having to be the default app?
I've read the responses to this question Send SMS message using non default SMS app on Android 4.4 but that is more concerned with ensuring that the messages are being written to the provider. I don't want that.
Short answer is no.
Long answer :
There are actually options but it involves a lot of work. One is to download the source code for aosp and modify the mms.apk to allow it to receive intents from your app to send sms without writing to provider.
Another way is to baksmali your phones default sms application and add smali code that would allow you to do the same as above. This would require technical knowledge of smali and decompiling/recompiling apks.
With that said, there are problems that will arise such as what if the phone user decides to use a third party sms/mms application for their short messaging needs.

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.

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