android - SmsManager.sendDataMessage(..., onSpecificPort , ...,.. ) Is not Filtering SMS On Port Basis -


what want

send sms on specific port , application listening sms receiving same port should react sms receiving.

i have receiver this

    <receiver android:name=".binarysmsreceiver">          <intent-filter>              <action android:name="android.intent.action.data_sms_received"/>             <data android:port="8091"/>             <data android:scheme="sms"/>          </intent-filter>      </receiver> 

and sending sms below

manager.senddatamessage(phonenumber, null, (short) sms_port, data, pisend, pidelivered); 

myreceiver did receive msg issue along side others receivers able listen.

my native inbox of device catching sms.

if declare receiver different port number able listen. verified logs.

or if change port number first receiver receives .

only god know why port not filtering sms.

please gave suggestions. direction or hint or solution welcomed.

thanks

answer port filtering doesn't work devices of different manufacturers.

workaround

try sending simple text messages. in message body add of own header information let receiver know sms.

like

messagebody = "//someheaderpattern:" + messagebody;

make receiver listening priority high.

if receiver detect sms. abortbroadcast avoid other listen same. else nothing.

this workaround nothing guaranteed


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -