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. cliq dituntut

http://m.detik.com/read/2009/11/25/085635/1248272/399/blackberry-onyx-ditudi 
ng-langgar-paten



--~--~---------~--~----~------------~-------~--~----~
=========================
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click  

2. How to extract .properties files from third-party jar to apk file?

No one met such problems?

Currently, I have to make some change to the package.mk,
definitions.mk and base_rules.mk to generate the result as expected.
But I'm afraid this is not the best solution for it might have
systematic impact.




-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. How to extract the .properties files in a third party jar file to apk file

4. How to show a 'Progress View' during a ListView is loading

5. Button is not clicking. OnClick Listener not being triggered.

6. onDraw() being called multiple unintended times

7. Calculating text lenght