title: Null Pointer Exception , Parcel.ReadException while sending SMS?
body: <p>I am working on an appliction in which I ahve to use SMS service. When I try to send SMS I get the following strange exception. Sometimes SMS is sent absolutely fine, but sometimes I get this exception. I don't know where i8es the problem. Following is the my code:</p>
  
  <pre><code> String messageText = Util.getSMSText(myActivity.this, Util.CurrentLocation);
   messageText += "http://maps.google.com/maps?q=" + locationInfo.getLat() + "," + locationInfo.getLng();
   String number = guardian.getGuardianNumber();
   SmsManager smsManager = SmsManager.getDefault();
   smsManager.sendTextMessage(number, null, text, null, null);  
  </code></pre>
  
  <p>Following is the trace:</p>
  
  <pre><code>12-22 21:03:59.325: W/System.err(8140):     java.lang.NullPointerException
  12-22 21:03:59.325: W/System.err(8140):     at android.os.Parcel.readException(Parcel.java:1328)
  12-22 21:03:59.325: W/System.err(8140):     at android.os.Parcel.readException(Parcel.java:1276)
  12-22 21:03:59.325: W/System.err(8140):     at com.android.internal.telephony.ISms$Stub$Proxy.sendTextOnSubscription(ISms.java:1096)
  12-22 21:03:59.325: W/System.err(8140):     at android.telephony.SmsManager.sendTextMessage(SmsManager.java:149)
  12-22 21:03:59.325: W/System.err(8140):     at android.telephony.SmsManager.sendTextMessage(SmsManager.java:89)
  12-22 21:03:59.335: W/System.err(8140):     at com.invocode.sms.SMSManager.sendSMS(SMSManager.java:12)
  12-22 21:03:59.335: W/System.err(8140):     at com.invocode.ui.iamhere.myActivity$2$2.onClick(myActivity.java:205)
  </code></pre>
  
  <p>Any help is appreciated ...</p>