Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

android gps blink

$
0
0

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)
manager.RemoveUpdates(listener);
}


Viewing all articles
Browse latest Browse all 58056

Trending Articles