Hi,
I am trying to send an sms containing binary data. The length of the sms
can be from 125 to 1000 bytes.
I can send successfully small amount of data(upto 133 bytes) but, while
sending data more that that the sendDataMessage() giving
NullpointerException.
Have you folks tried to send binary data using sms where the length has
been greater than 133 bytes. Was it successful? If so, sharing of some
information\links on how to solve the problem will be much appreciated.
Below is a snippet of the code that I have written for sending and
receiving the message.
also, I have done the same thing on blackberry and the implementation works
fine.
CODE SNIPPET:
----Manifest ---file---
<receiver android:name=".SmsReceiver" >
<intent-filter android:priority="10" >
<action
android:name="android.intent.action.DATA_SMS_RECEIVED" />
<data android:scheme="sms" />
<data android:port="8091" />
</intent-filter>
</receiver>
----- Code to send SMS -----------
SmsManager sms = SmsManager.getDefault();
sms.sendDataMessage(destinationAddress,
null,short(8091),data, sentPI, deliveredPI);
--
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