Network or GPS Location for Proximity

Put your problem here if it does not fit any of the other categories.

Network or GPS Location for Proximity

Postby Joe86 » Wed Aug 10, 2011 4:04 pm

Hi there,

i have following problem:
I have a app that uses android.permission.ACCESS_FINE_LOCATION. In my App, i will add some proximity Alerts and react to them. This works all fine, but now, i have a problem to switch between network (mock) and gps location.
I cant find any option to switch for the proximity alert between network and gps provider. The proximity alert seems to use every time the gps, if available. I want that the user of my app is able to select manualy between network and gps for the proximity alerts.
Is there any chance to do this?

Best regards,
Posts: 2
Joined: Fri Jun 17, 2011 2:27 pm


Re: Network or GPS Location for Proximity

Postby phishman3579 » Tue Sep 20, 2011 3:19 am

May I misunderstood the question but a parameter of the LocationManager is the type of location provider..

Something like this:
locationMgr.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME, MIN_DISTANCE, this);
locationMgr.requestLocationUpdates(LocationManager.NETWORK_PROVIDER , MIN_TIME, MIN_DISTANCE, this);
Posts: 9
Joined: Sun Aug 28, 2011 4:49 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 16 guests