help about SMS BroadcastReceiver conflict with GPS LOCATION_SERVICE

by Kevin AN » Mon, 02 Mar 2009 11:24:49 GMT


Sponsored Links
 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?

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Secure Element Nexus S

Hi Friend,

Please someone help me how to access secure element in nexus S and how
to configure and Manage that thing....

Thanks....

Regards,
Sugeng

-- 
.

2. Unicode file names in APK

I've found out that resources placed in the Assets or Res folders with
Unicode characters (i.e. Cyrillic letters) are ignored when compiling
and creating the APK file, and these are not included into it.
Anyone has found a solution to allow files using Unicode characters as
names?

-- 

3. Self-managing wake-up/shutdown on Android based devices

4. AdapterView.OnItemSelectedListener.onItemSelected called with out of date position argument!

5. android phone 4 jt-an

6. Worthed mana Dell Streak atau Desire HD?

7. Oot: id-android chapter bandung kumpul-kumpul