Logo

dev-resources.site

for different kinds of informations.

Location without Google Services

Published at
10/6/2022
Categories
android
location
gps
Author
kostovtd
Categories
3 categories in total
android
open
location
open
gps
open
Author
8 person written this
kostovtd
open
Location without Google Services

These days you will rarely find an app that doesn’t have some kind of location-based functionality. Things like navigation, geofencing or location tracking are more and more common. It’s all good when you can rely on Google Play Services. Sadly, that’s not always the case. Sometimes the devices that your users are going to use don’t have Play Services installed. Such devices can be manufactured by some weird and unknown company, can have a custom ROM installed on them, or be located in a country where Google is not allowed to operate. No matter the reason, the fact that Google Play Services are missing from the device can make the task of obtaining the user’s location quit challenging. So let’s try to find out what options we have to solve this problem.

There are two different ways of obtaining a location without using Google Play Services:

  1. By using the Location Manager
  2. By using a 3rd party Network Location Provider (NLP)

Location Manager

This is the old school way of obtaining a location. By using the Location Manager we can choose between four different providers:

  • GPS - a precise way to determine the current location of the user. Although there are some drawbacks. This method is a bit slow and is not suitable for indoors use. The reason is that an actual connection with at least three GPS satellites must be established. The process is called triangulation. https://en.wikipedia.org/wiki/Global_Positioning_System
  • Network - that’s faster than using the GPS provider. It relies on using data about your current Wi-Fi or mobile network. It’s not that accurate compared to the GPS provider, but it’s faster and can be used indoors as well. It’s an interesting process, and it was developed long before the invention of GPS. You can read more here https://en.wikipedia.org/wiki/Mobile_phone_tracking
  • Passive - by using it we will get a location only if some other app had requested it. It’s power efficient, but it’s not reliable at all. Fused (since API 31) - it’s a combination between the other providers.

You can find a simple gist with examples here - https://gist.github.com/kostovtd/9bbe9352c7ef6adfc313bac193b48424

The good thing about using the Location Manager is that it is so old that it actually doesn’t use the Google Play Services under the hood. 😆

3rd party Network Location Providers (NLPs)

These Network Location Providers work somehow in a similar fashion like the Location Manager’s Network provider. The difference is that the phone sends a HTTP request with some data regarding cell tower coverage, IP address, etc. Based on this information, the corresponding service executes a search in it’s database and hopefully figures out your current location.

There are multiple services out there which provide a variety of different price packages, response formats and have different limitations. These are just three suggestions:

  1. https://github.com/microg/UnifiedNlp - acts as a middle ware for multiple backends which have network location features.
  2. https://ichnaea.readthedocs.io/en/latest/index.html - a geolocation service that uses both Bluetooth, WiFi and Cell data. The project is open only for not commercial use.
  3. https://aws.amazon.com/location/ - provides a huge set of maps and location based features. Although, I was not able to find a simple way of getting the current location of the user.

Feel free to share, comment & give your opinion on the topic!

gps Article's
30 articles in total
Favicon
GPS Monitoring function on SVMS Pro video management software has been released .
Favicon
GPS Dog Collars: A Game-Changer for Lost Pet Prevention
Favicon
Unveiling the Secrets of Your Photos: Discovering GPS Locations
Favicon
How a Time Clock App With GPS Can Boost Workforce Productivity?
Favicon
Listen for realtime location updates from pulsetracker on your backend
Favicon
Touch Tag: The Smart Pet Tracker by Letstrack
Favicon
Best Small GPS Tracker: Portable Tracking with Trakbond
Favicon
Does GPS need internet to work?
Favicon
Building a command line photo GPS tagger using Docker, .Net and ExifTool
Favicon
The Anatomy and Technology Behind GPS Devices: A Comprehensive Guide
Favicon
GPS Visualizer
Favicon
What Happens When Site Wants to Know Your Location - How I Voided My Firefox Warranty
Favicon
5 Essential Features To Look For In A GPS Vehicle Tracking System
Favicon
DIY Onocoy Ntrip Server and Reference Station Setup
Favicon
What are Advantages of a Fleet Management System?
Favicon
Empowering Agriculture with GIS and GPS: The New Age of Precision Farming.
Favicon
GPS Speed Measurement: Accurately Tracking Movement in Various Fields
Favicon
GPS Geolocation vs IP Geolocation: How To Test Them On Real Devices?
Favicon
Vamosys gps
Favicon
How GPS works?
Favicon
Location without Google Services
Favicon
Wi-Fi communication using two u-blox C099-F9P application board
Favicon
Obika GPS Pt 1: My First Project using Traccar.
Favicon
Use Cell Tower and Wi-Fi Triangulation to Achieve Pin-Point Locations, without GPS
Favicon
Retreiving GPS data in decimal format from EXIF data in photos
Favicon
Jual Gps Geodetic South Galaxy G1
Favicon
Anti-Theft GPS Tracker and Recovery System
Favicon
Low Fi LoJack® with Blues Wireless and React
Favicon
RaspberryPi, SIM7600, GPSd
Favicon
What is Fishfinder GPS?

Featured ones: