how to receive text sms to specific port..

后端 未结 2 1503
暖寄归人
暖寄归人 2020-12-05 03:48

How to receive text sms to a specific port? I have been looking for an answer to this question but to no avail. This has been asked a few times but nobody seems to have a cl

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-05 04:12

    [NOTE: The code that i have mentioned below is not working on the emulator but successfully on my LG P350 having Android V2.3]

    I have used the demo code given on mobiForge but have changed the sendTextMessage() to sendDataMessage() with PORT_NO as 8901 (also converted text data to byte[] data). My receiver is:

     
            
             
                 
                 
             
     
    

    A working example is KRVarma's SMSDemo which is also functional.

提交回复
热议问题