I realize that there was a thread about this back in 2008, but I am
having some newer problems, with a new version of android.

Hello I am still having trouble sending a data message to a specific
port.  I am trying to use to separate emulator instances,  5554 to
send and 5556 to receive the data message.

This is my manifest code for the broadcast receiver on 5556

<receiver android:name=".SMSReceiver">
  <intent-filter>
     <action android:name="android.intent.action.DATA_SMS_RECEIVED" /
>
        <data  android:scheme="sms"/>
        <data android:host="localhost"/>
        <data android:port="8888"/>
  </intent-filter>
</receiver>


This is some of the code for my activity (SMSReceiver.java) which is
launched once the device receives the data SMS

if(!
intent.getAction().equals("android.intent.action.DATA_SMS_RECEIVED"))
               {
                    return;
               }



On the sending side, Emulator instance 5554 I have the following code
to send the message.

 SmsManager smsManager = SmsManager.getDefault();
 short sendport = 8888;
 String dest = "5556"
 String source = "5554"
 String mssg = "PICMessage99999 http://dl.dropbox.com/u/3362269/image111.png";
 smsManager.sendDataMessage(dest,source, sendport, mssg.getBytes(),
null, null);


I receive the message, but the problem is that I still see the message
end up in the INBOX of the 5556 emulator.  I am also having trouble
correctly parsing the actual message, but that is another problem.
Right now, I just want to receive the SMS but not have it end up in
the INBOX.  I thought that's what would be accomplished by sending the
message to  a data port as a data message rather than through the
regular SMS channels.  Any help is greatly appreciated

- Ethan



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to