Apt3kStudio / Phone

2 stars 0 forks source link

Set-up Geolocation #72

Closed jagomez16 closed 5 years ago

jagomez16 commented 5 years ago

IP Geolocation

Similar to time-stamp issue #13 , we need to create IP geolocation to identify or estimate the real-world geographic location of the mobile phone

The diagram below shows how the watch, phone and web will communication

image`

Stage 1 - Geolocation

Requirement

@nvasquedr here is a example of how to implement [xamarin essentials geolocation]()

Example 1

try
{
    var location = await Geolocation.GetLastKnownLocationAsync();

    if (location != null)
    {
        Console.WriteLine($"Latitude: {location.Latitude}, Longitude: {location.Longitude}, Altitude: {location.Altitude}");
    }
}
catch (FeatureNotSupportedException fnsEx)
{
    // Handle not supported on device exception
}
catch (FeatureNotEnabledException fneEx)
{
    // Handle not enabled on device exception
}
catch (PermissionException pEx)
{
    // Handle permission exception
}
catch (Exception ex)
{
    // Unable to get location
}

Example 2

jagomez16 commented 5 years ago

@nvasquedr @dioscarr where we at with this issue? What portion of this issue needs to be move to next month?