Questions tagged [android-gps]

Android's GPS device and related API features.

Android provides a Location and Sensors API for programmatical access to its GPS device.

733 questions
3
votes
2 answers

GoogleApiClient: hide GPS icon on status bar when a service is in the background

I'm using GoogleApiClient to implement a location listener service, but the GPS icon is always being displayed, even with the service in background. How to disable the GPS icon when the service is in the background? Follow the sources…
3
votes
4 answers

After enable gps from an app prompt how to refresh and get the current location?

I am currently developing an Android app which prompts the user to enable GPS if it's not on and I have used Alert Dialog for this purpose. After I enable the GPS from settings and come back to my app by pressing back button, the toast message…
user8181649
3
votes
0 answers

Location Updates Not Regular

I am developing a distance based app which requires regular distance updates the app works fine if the device has internet but if the device does not have connectivity in that case even if the GPS is on and I am moving it fails to update the…
Jatan
  • 49
  • 1
  • 6
3
votes
3 answers

How to create a real time location sharing android app

I want to create an app where people can see where they and their friends are Eg: - imagine 2 people are using the app they should be able to see each other's location in real time and they should be able to navigate to each other Can someone help…
iyashwant
  • 99
  • 1
  • 1
  • 4
3
votes
1 answer

Android background location build in xamarin is taking forever

So i am working with an app,which gets me current latitude,longitude,current speed etc,using GPS data,The app does not give me any errors and deploys successfully,and i am using my phone (Sony Xperia D 2005) to deploy it. Anyway,it says "Waiting on…
Fatjon Rrapaj
  • 133
  • 1
  • 6
3
votes
3 answers

Calculate distance between two locations in metre

I have two locations and I want to calculate distance in meter. I wrote some code but it's not working perfectly. private void getDistanceBetweenTwoPoints(double lat1,double lon1,double lat2,double lon2) { Location loc1 = new Location(""); …
BekaKK
  • 2,173
  • 6
  • 42
  • 80
3
votes
2 answers

Android get Location in Button click

I try to get the location in button click. I wrote LocationListener method and everything working perfect.This is my source private class MyLocationListener implements LocationListener { @Override public void onLocationChanged(Location loc)…
BekaKK
  • 2,173
  • 6
  • 42
  • 80
3
votes
0 answers

Android GnssStatus.callback is not working

I am trying to detect whether the GPS in the phone is being used or not. So far, GpsStatus listener has been working fine for my Android devices. In the case of SDK 24, I have been using GnssStatus.callback. I have checked that callback is…
Shathil
  • 31
  • 1
  • 3
3
votes
2 answers

GPS active on after my application destroy form my mobile stack

i want to on my GPS after my application destroy form stack so below is my code Main.java public class LocationActivity extends Activity implements LocationListener, GoogleApiClient.ConnectionCallbacks, …
Harshal Kalavadiya
  • 2,412
  • 4
  • 38
  • 71
2
votes
0 answers

NETWORK_PROVIDER and GPS_PROVIDER both returning NULL on some GoEdition devices after Nov23 2022

This might help someone one day. Background Around Nov23rd2022 our team started receiving complaints from users, about our app that does attendance by ensuring that users can only work in designated locations. we do this by comparing the current gps…
KuriaNdungu
  • 623
  • 8
  • 20
2
votes
0 answers

An Idea for an app but I don't know if kivy capable of that

I have some problem and I'll list them here: Emulator for iPhone and Android, how can I build an app for iPhone/Android using kivy but I have not emulators open source to see how my app works and performs? Do I have to always download the app to my…
2
votes
1 answer

How to track movements in a room with Android Studio?

The need is to track the user moving in small areas (for example at home, in a garden, in a museum, or in some rooms) with Android Studio (Java) drawing the path he does on the screen. I can use StepCouter to count the user steps and the distance…
Stefano
  • 209
  • 2
  • 10
  • 34
2
votes
1 answer

Issues with Plyers GPS module on Android 12 device

I've been having issues with Plyers GPS module, and cannot fix them. I've already tried advices from this Github thread - https://github.com/kivy/plyer/issues/657. I've tried modifying gps.py with changes from a pull-request, tried requesting both…
2
votes
1 answer

FusedLocationProviderClient crash with java.lang.NullPointerException: parameter location specified as non-null is null

I'm using FusedLocationProviderClient in my app and it works fine to get user current location but suddenly I got this crash java.lang.NullPointerException: Parameter specified as non-null is null: method…
Amin
  • 463
  • 2
  • 11
  • 29
2
votes
0 answers

How to detect fake location in Android?

I am working on an app in which I have to trace the location of drivers. I used fusedlocation and GPS location methods for this purpose. It is working fine. But some drivers/users have installed Fake GPS/Fake Location Apps on their devices through…