Forum Xamarin.Android

How do I get the GPS provider in my application?

JakeWatkinsJakeWatkins USMember
edited August 2016 in Xamarin.Android

I've written a basic test bed application following the GetLocation sample provided by Xamarin. However, when I run either application on my Samsung S7 I only get the "passive" provider. For clarity - I get the same results with the GetLocation sample. Neither gets the GPS provider. If I run in the Android simulator I do get the GPS provider.

I even added a simple loop that iterates over the providers to collect all of the enabled providers. The only one is passive.

I've given my application nearly every permission available:
ACCESS_FINE_LOCATION
ACCESS_LOCATION_EXTRA_COMMANDS
.ACCESS_COARSE_LOCATION
BLUETOOTH_ADMIN
BLUETOOTH
ACCESS_MOCK_LOCATION
ACCESS_WIFI_STATE
INTERNET
LOCATION_HARDWARE
ACCESS_NETWORK_STATE
CONTROL_LOCATION_UPDATES

(some of the permissions are for work I'm doing with Bluetooth)

If I run google maps and then run my test application things work, but it doesn't seem like a good user experience to require them to run one application to make another application work.

Can somebody offer me a clue as to what I'm doing wrong?

TIA

Sign In or Register to comment.