I'm trying to create a simple app to send and receive binary messages between phones. I'm using an EditText to get the message and I have hardcoded my phone number in for testing on my phone for now. The function call looks something like:
sms_manager = SmsManager.getDefault(); try { sms_manager.sendDataMessage(MY_NUMBER, null, (short) SMS_PORT, msg.getBytes(), piSend, piDelivered); } catch(NullPointerException e) { ((TextView)findViewById(R.id.error)).setText("NullPointerException caught"); } When I run it on a virtual device nothing happens but I don't get an error (I can make a working text version of this which works on the phone and also does nothing on the virtual device). Every time I run it on my phone it throws the NullPointerException without getting to either of the PendingIntent objects (which make a Toast). When I debug it in eclipse it seems that ISms$Stub$Proxy.sendData() is generating the NullPointerException. I haven't been able to figure out what that means exactly but I have read elsewhere that this function works on GSM phones and throws a NullPointerException on CDMA phones. I am testing on a CDMA Droid2 Global. Does anyone know if I am doing something wrong if this function just doesn't work with CDMA? Any suggestions for a workaround? Thanks, Brandon -- 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