Exemplo n.º 1
0
        private async Task calcolaPosizione()
        {
            Posizione pos = (Posizione)await positionAdapter.calcolaPosizione();

            if (pos != null)
            {
                Preferences.Set("latitudineCorrente", pos.latitudine.ToString());
                Preferences.Set("longitudineCorrente", pos.longitudine.ToString());
                Preferences.Set("indirizzoCorrente", pos.indirizzo);
            }
            else
            {
                await DisplayAlert("Impossibile accedere alla posizione", "Prova ad accendere il GPS", "OK");
            }
        }