Forum Xamarin.Forms

android gps blink

We have developed an app with Xamarin Forms which utilized the maps, regarding the Android version we find that when the app is put in the background android gps icon blinks until you delete it completely from memory the app itself. Here is the code used unsuccessfully

//code for activation
private readonly LocationManager manager;
private readonly string[] providers;

public Geolocator()
manager = (LocationManager)Application.Context.GetSystemService(Context.LocationService);
providers = manager.GetProviders(false).Where(s => s != LocationManager.PassiveProvider).ToArray();

//code for deactivation
public void StopListening()
for (int i = 0; i < providers.Length; ++i)


Sign In or Register to comment.