App.User.LocationInfo
App.User.LocationInfo copied to clipboard
Tracking Plugin for Xamarin. It retrieves information about user's location without GPS activation: IP address, country name, city name, GPS coordinates (latitude and longitude), country calling code,...
Tracking Plugin for Xamarin
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.
Setup
- Available on NuGet: https://www.nuget.org/packages/App.User.LocationInfo/
- Install into your shared project.
Platform
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.
Usage
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();
Sample project
Check it out here !
Created by: Kodjo Laurent Egbakou
- LinkedIn: Kodjo Laurent Egbakou
- Twitter: @lioncoding
Note
More updates are coming.
License
The MIT License (MIT) see License file
Contribution
Feel free to create issues and PRs 😃