Modifing SMS before sending in android - 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.

Related

Sending Too much messages programmatically in Android jellyBean

I'm trying to send Text messages to different contacts in a bulk. The contacts are several hundred and i'm reading them from a text file. Now when my app tries to send messages , A Dialog Appears telling
App is sending too much messages => Allow , Deny
I've studied several forums that it's a restriction introduced in JellyBean to prevent malicious activity and it can't be undone without rooting your device and running some weird scripts. Is there a fix to this problem? if there isn't any fix , then can we Programatically click Allow button on that message dialog within our app?
Thanks in advance.
Is there a fix to this problem?
Send fewer messages.
Or, send the messages at a slower rate.
Or, use some sort of online SMS gateway to send the messages, perhaps through a serve of yours, rather than sending them through Android's SmsManager. You can find some of these by searching for online sms gateway on your favorite search engine.
can we Programatically click Allow button on that message dialog within our app?
No. The point behind the block is so that the user gets a vote as to whether your app can spend quite so much money (or SMS allotment from a post-paid plan) on the user's behalf. Bulk SMS is not designed to be done from Android, but rather from an online SMS gateway.

Receive specific SMS and elaborate it with an Android app?

sorry fo my complete ignorance developing an Android.
I'm asking about the feaseability of this pseudocode I would like to implement as native app; let imagine a task that:
when a specific SMS arrive (only those sent from a specific sender number)
possibly (multi-SMS in case of text bigger than 160 chars )
elaborate/format each received SMS:
. save text content on a local db
. print text on a bluetooth printer
. reply to sender with some sort of "ACK" SMS
BTW, what above could be sort of background task, and I would need on foreground a sort of user interface that visualizes received SMS and do some user actions (sending back SMS to sender)
Is all that possible on Android ? Any issue ?
I mean, above all: is possible to "catch" specific SMSs (by example those sent by a specific sender number), living unalterated the usual SMS workflow for ALL other SMSs ?
Sorry for my beginner question and Thanks for your patience
giorgio
www.giorgiorobino.com
Following this link to implement a BroadcastReceiver that will listen for incoming SMS.
Inside your onReceive from your BroadcastReceiver, handle your logic (print/save/..)
It is possible, yes. But not recommended. That being said the way to set this up is to catch the SMS intent, so your app would be started when an SMS is received. Otherwise it would not run at all (as long as you don't have any other interface open). For a code example on the message interception part, see this post. For the database part look up local storage on android phones. Look up on SMS messaging for the reply. Not sure how bluetooth printing would work as I've never done it, but if it's a standard protocol I'm sure there's either built in support or a library for it.

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.

How to send App to App message

Is there a way to send messages directly from application to application? I'm making an app that needs verification from another phone, but I only send the messages via SMS, so there is a big chance that a false message having the same format might end up being recognized by the application as a legit one.
I don't think it's possible. For functionality like this you would usually use server, and, maybe Google Cloud2Device to send Push messages.
If both phones are in close proximity to each other, you could make a bluetooth connection and transfer the data that way. It would work like that Bump app that transfers files when the phones are bumped together.
As a work around to the way you are doing it now, you could do a simple encryption of the messages so that they are not plain text and won't match a real text message. If you wanted to make it pretty, you could encode the data in a picture so it doesn't look like a garbage text to the end user.

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