1

It's been a while that I'm surfing the net in order for finding a way to disable the broadcast for incoming sms-text, but mainly it's said that on android 4.4+ you can't do this because it's feature has been removed. But I can show you this is Wrong. In a banking application (targeted android 4.9) in this link you can find an application which sends out and receives sms without having other apps noticed the transmition of sms. you can download the app here. Please help me with this issue. how can I Receive sms without having other apps notified ?

user1692520
  • 19
  • 1
  • 5

1 Answers1

0

They're most likely using data SMS, also known as port-addressed SMS. In fact, a quick, crude unzipping of the APK, and a short perusal of the manifest shows that they have a Receiver registered for the DATA_SMS_RECEIVED action on port 7442.

Data SMS are not handled by the Provider (apart from collation), and only apps listening on that specific port will receive them, so they won't appear in the platform app, or pretty much any other SMS app.

So it's not a matter of the SMS_RECEIVED broadcast being aborted, or the SMS_DELIVER broadcast being intercepted. It's just not regular text messaging.

Mike M.
  • 38,532
  • 8
  • 99
  • 95
  • I wasn't aware of such kind of transitioning way. Can everyone send sms in this way ? or it needs some requirements ? – user1692520 Mar 23 '16 at 09:20
  • Sure, you can handle data SMS. In fact, you could setup a Receiver on that same port, and get the messages that are being sent to that app. There are examples of both sending and receiving data SMS in [this post](http://stackoverflow.com/a/9853822). – Mike M. Mar 23 '16 at 09:25
  • Thank youuuuuuu. it worked finally as I expected. 1 more question while I'm getting my text converted to bytes as the following: {String messageText ="message!"; short SMS_PORT = 8901; SmsManager smsManager = SmsManager.getDefault(); smsManager.sendDataMessage("**********", null, SMS_PORT,messageText.getBytes(), null, null);} if I change the message content to nonEnglish language for example persian (sth like this String messageText ="متن";) then the receiver shows some thing unreadable. why doesn't this work for persian ? Sincerely Thank youuu – user1692520 Mar 23 '16 at 09:53
  • In that example, instead of using that inner `for` loop that builds the `String` one character at a time, try something like this: `recMsgString += new String((byte[]) data);`, without the loop. – Mike M. Mar 23 '16 at 09:58
  • Yeah, that should work. I just tested it, and apart from messing with the text alignment in my logcat (which is to be expected), that sample `String` you posted came through just fine for me. – Mike M. Mar 23 '16 at 10:07