This Plugin retrieves information about user's location without GPS activation: IP Address, country name, city name, GPS coordinates (latitude and longitude), country calling code, country currency, country flag image, etc.
- Available on NuGet: https://www.nuget.org/packages/App.User.LocationInfo/
- Install into your shared project.
App.User.LocationInfo is written in C# as .NET Standard 2.0 project. it works fine in applications that can be deployed directly to users' devices. The plugin is based on the user's IP address to retrieve location information.
Add namespace App.User.LocationInfo.Services
and call TrackingService
class to access to all methods:
- Get current user's IP Address:
// Get current user's IP Address
var ip = await TrackingService.GetUserIPAdressAsync();
- Get current user's country code:
// Get current user's country code
var country_code = await TrackingService.GetUserCountryCodeAsync();
- Get current user's country name:
// Get current user's country name
var country_name = await TrackingService.GetUserCountryNameAsync();
- Get BasicUserLocationInfo object (IP Address, Country, City, Currency, GPS coordinates, Internet Service Provider, ...)
// Get BasicUserLocationInfo object
var basic_userlocationInfo = await TrackingService.GetBasicLocatioInfoAsync();
- Get UserLocationInfo object ( BasicUserLocationInfo object + URL of the country flag image )
// Get UserLocationInfo object
var userlocationInfo = await TrackingService.GetLocationInfoAsync();
Check it out here !
- LinkedIn: Kodjo Laurent Egbakou
- Twitter: @lioncoding
More updates are coming.
The MIT License (MIT) see License file
Feel free to create issues and PRs 😃