code is here:
public void onReceive(Context context, Intent intent)
{
                LocationManager lm = (LocationManager) context.getSystemService
(Context.LOCATION_SERVICE);

                loc = lm.getLastKnownLocation("gps").toString();

                PendingIntent dummyEvent = PendingIntent.getBroadcast(context, 
0,
new Intent("com.xxx.xxx.IGNORE_ME"), 0);
                mng.sendTextMessage(addr, null, loc, dummyEvent, dummyEvent);

}

the problem is:
sendTextMessage work well when the two above line is commented. but
when the two line is uncommented, sendTextMessage will trigger a null
point exception!
I think this issue is because the first line
(context.getSystemService) modify the state of "context".
so , can anyone help me?

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

Reply via email to