Skip to content Skip to sidebar Skip to footer

Smsmanager.senddatamessage(..., Onspecificport , ...,.. ) Is Not Filtering Sms On Port Basis

What i want to do is Send SMS on a specific PORT and application listening to sms receiving for the same port should only react to the sms receiving. I have a receiver like this

Solution 1:

Answer is that this port filtering doesn't work well for all the devices of different manufacturers.

Workaround is

Try sending simple text messages. With in the message body add some of your own header information to let your receiver know that it is your sms.

Like

messageBody = "//someHeaderPattern:" + messageBody;

make your receiver listening priority very high.

If your receiver detect its your sms. abortBroadcast to avoid other listen the same. else do nothing.

This is just a workaround nothing is guaranteed

Post a Comment for "Smsmanager.senddatamessage(..., Onspecificport , ...,.. ) Is Not Filtering Sms On Port Basis"