All Projects → dev-family → react-native-device-country

dev-family / react-native-device-country

Licence: MIT license
Get device location by telephony (SIM card) or settings without using GPS tracker.

Programming Languages

java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
ruby
36898 projects - #4 most used programming language
c
50402 projects - #5 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to react-native-device-country

FusedBulb
Location fetch library.
Stars: ✭ 22 (-33.33%)
Mutual labels:  gps, location, gps-location
LocationShare
A simple Android application to share your location
Stars: ✭ 75 (+127.27%)
Mutual labels:  gps, location
spoofgo
An Application for Spoofing Movement written in Golang
Stars: ✭ 15 (-54.55%)
Mutual labels:  gps, gps-location
GPSService
Demonstrates how to use a service to regularly update a activity with data via callback. Also allows the activity to call functions on the service.
Stars: ✭ 16 (-51.52%)
Mutual labels:  gps, gps-location
Geolocation
Flutter geolocation plugin for Android and iOS.
Stars: ✭ 205 (+521.21%)
Mutual labels:  gps, location
Maps
🌍🌏🌎 The whole world fits inside your cloud!
Stars: ✭ 253 (+666.67%)
Mutual labels:  gps, location
Atlas
🌎 Atlas is a set of APIs for looking up information about locations
Stars: ✭ 21 (-36.36%)
Mutual labels:  gps, location
React Native Fused Location
Finest location for react-native on Android using the new Fused API.
Stars: ✭ 118 (+257.58%)
Mutual labels:  gps, location
orange3-geo
🍊 🌍 Orange add-on for dealing with geography and geo-location
Stars: ✭ 22 (-33.33%)
Mutual labels:  gps, location
aic-mobile-ios
Art Institute of Chicago Official Mobile App
Stars: ✭ 29 (-12.12%)
Mutual labels:  gps, location
gpx-builder
Builder of GPX files
Stars: ✭ 25 (-24.24%)
Mutual labels:  gps, location
Ulogger Android
μlogger • android application for real-time collection and publishing of geolocation data
Stars: ✭ 168 (+409.09%)
Mutual labels:  gps, location
Corelocationcli
Command line program to print location information from CoreLocation
Stars: ✭ 138 (+318.18%)
Mutual labels:  gps, location
gps-share
Utility to share your GPS device on local network
Stars: ✭ 49 (+48.48%)
Mutual labels:  gps, location
Coregpx
A library for parsing and creation of GPX location files. Purely Swift.
Stars: ✭ 132 (+300%)
Mutual labels:  gps, location
SimpleLocationGetter
No description or website provided.
Stars: ✭ 21 (-36.36%)
Mutual labels:  location, gps-location
Phpgeo
Simple Yet Powerful Geo Library for PHP
Stars: ✭ 1,306 (+3857.58%)
Mutual labels:  gps, location
Locokit
Location, motion, and activity recording framework for iOS
Stars: ✭ 1,353 (+4000%)
Mutual labels:  gps, location
surger
⚡ Is there surge pricing around me right now?
Stars: ✭ 20 (-39.39%)
Mutual labels:  gps, location
roam-reactnative
React Native Location SDK. High accuracy and battery efficient location SDK for iOS and Android by Roam.ai
Stars: ✭ 20 (-39.39%)
Mutual labels:  gps, location

react-native-device-country

Get device location by telephony (SIM card) or settings without using GPS tracker

npm version npm MIT
Platform - Android Platform - iOS

Installation

yarn add react-native-device-country

or

npm install react-native-device-country

Don't forget to run pod install after that!

Usage

import DeviceCountry, {
  TYPE_ANY,
  TYPE_TELEPHONY,
  TYPE_CONFIGURATION,
} from 'react-native-device-country';

// ...

DeviceCountry.getCountryCode()
  .then((result) => {
    console.log(result);
    // {"code": "BY", "type": "telephony"}
  })
  .catch((e) => {
    console.log(e);
  });

You can use spicific method for getting country

TYPE_TELEPHONY for getting country code from SIM card

DeviceCountry.getCountryCode(TYPE_TELEPHONY)
  .then((result) => {
    console.log(result);
    // {"code": "BY", "type": "telephony"}
  })
  .catch((e) => {
    console.log(e);
  });

or TYPE_CONFIGURATION for getting country code from phone location settings on iOS and phone language settings on Android

DeviceCountry.getCountryCode(TYPE_CONFIGURATION)
  .then((result) => {
    console.log(result);
    // {"code": "BY", "type": "config"}
  })
  .catch((e) => {
    console.log(e);
  });

TYPE_ANY will be used by default. It tries to use TYPE_TELEPHONY and fallbacks with TYPE_CONFIGURATION, if devive without SIM card.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].