Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/egbakou/app.user.locationinfo
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, country currency, country flag image, etc.
https://github.com/egbakou/app.user.locationinfo
gps-coordinates gps-location gps-tracking location netstandard nuget nuget-package tracking tracking-api xamarin-forms
Last synced: 3 months ago
JSON representation
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, country currency, country flag image, etc.
- Host: GitHub
- URL: https://github.com/egbakou/app.user.locationinfo
- Owner: egbakou
- License: mit
- Created: 2019-05-30T11:55:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T05:43:47.000Z (about 2 years ago)
- Last Synced: 2024-11-07T10:03:18.449Z (3 months ago)
- Topics: gps-coordinates, gps-location, gps-tracking, location, netstandard, nuget, nuget-package, tracking, tracking-api, xamarin-forms
- Language: C#
- Homepage:
- Size: 844 KB
- Stars: 27
- Watchers: 1
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
![](samples/TrackXamarinAppUser/TrackXamarinAppUser/screenshots/app.user.locationinfo-sample.png)
## Setup
- Available on NuGet: https://www.nuget.org/packages/App.User.LocationInfo/ [![NuGet](https://img.shields.io/nuget/v/App.User.LocationInfo.svg?label=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:
```csharp
// Get current user's IP Address
var ip = await TrackingService.GetUserIPAdressAsync();
```- Get current user's country code:
```csharp
// Get current user's country code
var country_code = await TrackingService.GetUserCountryCodeAsync();
```- Get current user's country name:
```csharp
// Get current user's country name
var country_name = await TrackingService.GetUserCountryNameAsync();
```- Get [BasicUserLocationInfo](https://github.com/egbakou/App.User.LocationInfo/blob/master/src/App.User.LocationInfo/Models/BasicUserLocationInfo.cs) object (IP Address, Country, City, Currency, GPS coordinates, Internet Service Provider, ...)
```csharp
// Get BasicUserLocationInfo object
var basic_userlocationInfo = await TrackingService.GetBasicLocatioInfoAsync();
```- Get [UserLocationInfo](https://github.com/egbakou/App.User.LocationInfo/blob/master/src/App.User.LocationInfo/Models/UserLocationInfo.cs) object ( [BasicUserLocationInfo](https://github.com/egbakou/App.User.LocationInfo/blob/master/src/App.User.LocationInfo/Models/BasicUserLocationInfo.cs) object + URL of the country flag image )
```csharp
// Get UserLocationInfo object
var userlocationInfo = await TrackingService.GetLocationInfoAsync();
```## Sample project
![](samples/TrackXamarinAppUser/TrackXamarinAppUser/screenshots/app.user.locationinfo-sample.png)
Check it out [here](https://github.com/egbakou/TrackXamarinAppUser) !
## Created by: Kodjo Laurent Egbakou
- LinkedIn: [Kodjo Laurent Egbakou](https://www.linkedin.com/in/laurentegbakou/)
- Twitter: [@lioncoding](https://twitter.com/lioncoding)## Note
More updates are coming.
## License
The MIT License (MIT) see [License file](https://github.com/egbakou/App.User.LocationInfo/blob/master/LICENSE)
## Contribution
Feel free to create issues and PRs 😃