Android: How To Find Out Location Provider Name From Key_status_changed Broadcast Intent Sent By Locationmanager?
I try work with NETWORK and GPS location provider simultaneously. In main activity I register location update request for each available provider: for (String provider : m_
Solution 1:
I found solution. It was a misunderstanding how Android work with PendingIntents. Indeed solution with payload extra's is working, but if previously has been made some requests for PendingIntents without payload data, application receive old intents without payload data. It is necessary reload device or make new request for PendingIntent with flag:
PendingIntentpi= PendingIntent.getBroadcast(GpsMain.this,0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
After that incoming intent will carry information about provider name.
Post a Comment for "Android: How To Find Out Location Provider Name From Key_status_changed Broadcast Intent Sent By Locationmanager?"