For anyone that runs into the same problem and arrives here from an
AltaVista search, the cause was (maybe) that I gave the data SMS API a
byte array that's too long. When I shortened it from 151 bytes to
around 100, Android stopped mysteriously crashing.



On Apr 4, 11:59 am, NTDYLF <[email protected]>
wrote:
> Hi, I'm sending data SMS messages with no trouble until one (otherwise
> unremarkable) message in particular makes it crash:
>
> E/AndroidRuntime(29764): Caused by: java.lang.NullPointerException
> E/AndroidRuntime(29764):        at android.telephony.SmsMessage
> $SubmitPdu.<init>(SmsMessage.java:100)
> E/AndroidRuntime(29764):        at
> android.telephony.SmsMessage.getSubmitPdu(SmsMessage.java:425)
> E/AndroidRuntime(29764):        at
> android.telephony.SmsManager.sendDataMessage(SmsManager.java:196)
>
> This is on a T-Mobile MyTouch running 1.6. I made sure I'm not sending
> any null parameters. Here's the code in SmsMessage.java that it
> crashes at:
>
>     public static class SubmitPdu extends SubmitPduBase {
>     }
>
> The crash is in the Android platform, but I'm guessing that I'm using
> it wrong, so I'm asking here. Why would <init>croak? Thanks in
> advance for your insight.

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to