Hi Ganesh ,
you reciever part if fine. There is problem on
sender's send, i am also facing same problem and learn that the
sendDataMesassage() could not send more than 133 bytes in a single message.
Did u find any solution for this problem..?
On Wednesday, February 16, 2011 8:06:13 PM UTC+5:30, Ganesh Pisal wrote:
I am using SmsManager sendDataMessage funtion to send byte[] to
another device. I was using port to send message. I was working
fine, but suddenly after one day or so it stoped working.(without
single line of change).
I tried to set different ports - 80, 8080, 16001, 12345
But still it is not working. Message is not getting received at
receiving end.
Sending Code :
--
short port = ;
sms.sendDataMessage(5556, null, port, hello world, null, null);
Receiving code:
--
public void onReceive(Context context, Intent intent)
{
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;
for (int i=0; imsgs.length; i++){
msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]);
info += msgs[i].getOriginatingAddress();
info += \n*BINARY MESSAGE*\n;
data = msgs[i].getUserData();
for(int index=0; indexdata.length; ++index)
{
info +=
Character.toString((char)data[index]);
}
}
Toast.makeText(context, info,
Toast.LENGTH_SHORT).show();
}
}
}
Manifest file is modified for Intent filter.
I think like native Messaging application there is limit on number of
binary SMS.
If yes, how set/change limit, if there is storage for same, how to
delete it.
I tried closing and starting emulator again also tried to restore
phone setting to factory setting.
Please help me, I am stuck from last few days.
Thanks in advance.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en