I want to write an app that is able to receive and send text messages,sms received must be able to contain text strings that would be interpreted as commands,the shipped may be for example the location gps,I have found that this class would seem appropriate http://developer.android.com/reference/android/telephony/SmsManager.html but is told to use 'telephony' for Android at or above 4.4 ,if i use SmsManager on Android 4.4.2 in your opinion ' i do harm' or is this an advice? what bothers me is that under telephony is said that only one application (the default), can manage sms and then my app should replace the default application for text messages,it is something that I would avoid , http://developer.android.com/reference/android/provider/Telephony.html ,thanks
Asked
Active
Viewed 512 times
-1
-
You don't need a library for that. Use android's native classes. – waqaslam Feb 27 '15 at 16:02
-
my title is wrong ,sorry,read the body,thank you – gian82 Feb 27 '15 at 16:05
-
I'm not sure what you mean by "harm", but there's no restriction on sending and receiving SMS in 4.4 or above. In a sense, it's less restricted, since the `SMS_RECEIVED` broadcast cannot be aborted, so no app can prevent your app from receiving incoming messages. – Mike M. Mar 01 '15 at 09:37
1 Answers
0
In pre-Kitkat Android, you can intercept the SMS before other apps do, assuming that other apps are not already trying to do so. See the post here:
Aborting/Cancelling Broadcasts
You intercept the broadcast then, if it is a "command" process it and abort it.
On API's for KitKat or after, you have only one option that I am aware of. Use something like Super Duper Messaging Manager:
www.superdupersms.com
It requires that the user have Super Duper installed, but it's SDK allows you to still intercept the message and process it, like on pre-KitKat installations.