Is there a way to intercept an incoming SMS message, and then modify it before presenting it to the user?
- Can it be done natively on iPhone / Andriod?
- Can it be done using PhoneGap?
- Can it be done using MonoTouch / Mono for Andriod?
If yes to any of the above, could you please provide some pointers to it?
My preferred-solution priority-order is as follows:
- Phonegap
- Mono
- Native
Thank you all in advance!!
EDIT:
For people wondering what is the purpose of this, basically I would like to put a word as a "label" in the sms depending on the content, so when I view the sms, I can see something like "IMPORTANT: blah blah blah", instead of just "blah blah blah".
try out this- //register this class as receiver in manifest file for SMS_RECEIVED intent
Yes there is a way, but unfortunately since the rollout of KitKat it isn't that easy any more. To work on versions > Jelly Bean you must have your application run as the default SMS application, that is to modify and abortBroadcast(). For 4.3 and below, create a broadcast receiver and do something like the following:
This info was obtained from here
Almost forgot...constants..
Sure! The EASIEST way on iOS is just to create a trigger on the SMS database - /var/mobile/Library/SMS/sms.db
then update the record!
The more advanced way of doing it, is hooking private methods, but I won't go that deep right now, you just need to explore the methods :)
BTW, you in any way you NEED a jailbroken device