hi friends i will try to send binary sms using sendDataMessage()
method but on the receiver time its receive only half message on
amulator and on live device its not receive specific app port message
please help what can do i am new on android please help me and if you
have example than send me hole source code of that and this is my
receiver code

String strmsg="";
                Bundle bundle = intent.getExtras();
                SmsMessage[] msgs = null;

                if(null != bundle)
                {
                        String info = "Binary SMS from ";
                    Object[] pdus = (Object[]) bundle.get("pdus");
                    msgs = new SmsMessage[pdus.length];
                    byte[] data = null;
                    String strtest = null;
                    for (int i=0; i<msgs.length; i++){
                        msgs[i] =
SmsMessage.createFromPdu((byte[])pdus[i]);
                        info +=
msgs[i].getOriginatingAddress();
                        info += "\n*****BINARY MESSAGE*****\n";

                        data = msgs[i].getUserData();
                        strtest= new
String(msgs[i].getDisplayMessageBody()  );
                        //strtest= new String(msgs[i].getUserData());
                        for(int index=0; index<data.length; ++index)
                        {
                                info +=
Character.toString((char)data[index]);
                                strmsg
+=Character.toString((char)data[index]);
                                Log.i("test char Receive:::::",info);
                        }

                    }

and this are the permission i used :
<uses-permission android:name="android.permission.READ_SMS"></uses-
permission>


        <uses-permission android:name="android.permission.SEND_SMS">
    </uses-permission>
    <uses-permission android:name="android.permission.RECEIVE_SMS">
    </uses-permission>
    <uses-permission
android:name="android.permission.RECEIVE_WAP_PUSH" />

-- 
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