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
-1
votes
1 answer

Identify user location in android

I'm quite a beginner to android and I'm trying out my best to learn android. I'm trying to create an android application that identify the user location using google maps. However I was able to identify user's location, but not as I expected. As in…
ONE_FE
  • 968
  • 3
  • 19
  • 39
-1
votes
3 answers

Why do I need a service to get location updates in the background

Update All the answers I got say "because the service runs in the background". This does not answer my question. Let's say I call locationManager.requestLocationUpdates from my activity and after a while my activity is destroyed. How does…
daramasala
  • 3,040
  • 2
  • 26
  • 33
-1
votes
1 answer

How to delay onMapready call in Google map based app

In my android app i have to get the current GPS/network position and then get the google map of that position.But before getting the position, the map has been loaded and every time it gets (0,0) position.How can i delay the On mapready call till…
Shuvo
  • 47
  • 1
  • 11
-1
votes
2 answers

onLocationChanged() is never trigered by requestLocationUpdate() - Android

I have used manager.requestLocationUpdates("gps", 1000, 0, new LocationDetector()); to get update after every second. But this method is never triggering onLocationChanged() method. I have run my application many times, and I have also tried to wait…
Sajal Ali
  • 427
  • 1
  • 10
  • 21
-1
votes
1 answer

onLocationChanged(Location location) is not working - Android

I have used manager.requestLocationUpdates("gps", 1800000, 1, new LocationDetector()); method of LocationManager manager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); class for getting update when either location change (device's…
Sajal Ali
  • 427
  • 1
  • 10
  • 21
-1
votes
2 answers

Getting current Location now, not on update

I'm building an app that requires your current location to initialize and show a map. I am requesting location updates with LocationManager.requestLocationUpdates(...), but this only appears to give me data when the location changes (for example I…
Blueriver
  • 3,212
  • 3
  • 16
  • 33
-1
votes
1 answer

requestPermissions() for gps inside a service . Error:"location provider requires ACCESS_FINE_LOCATION permission."

The Problem I am facing is giving gps permissions to the application through service I am writing. I tried finding an example to achieve this and examples shows writing a gpslocation finder in Activity, but in this case, i would like to implement…
-1
votes
3 answers

Android: java.lang.SecurityException

Am trying to fetch latitude and longitude in the service class by using network provider.Giving all the permission in the manifest
Binil Surendran
  • 2,524
  • 6
  • 35
  • 58
-1
votes
1 answer

Can we getLastknown location or approximate location without using GPS On in android?

I am writing an services which suggest near by facilities I am using fuseAPI and asking for last known location so that i can suggest at least something. If I am asking user to on GPS he is uninstalling app. I have used standard code of google to…
Lokesh Tiwari
  • 10,496
  • 3
  • 36
  • 45
-1
votes
2 answers

How to stop GPS BroadcastReceiver

I use broadcastreceiver on my gps that check if an user disabled GPS while app working. If the user disabled, then shows a dialog with information that a GPS is requaired. This is my sample in manifest:
SeaDog
  • 645
  • 1
  • 9
  • 32
-1
votes
1 answer

How deeply we can extract information with gps and google maps

Is it possible to grab all this information by using google maps and gps? Addresses of the current location Names of the locations(Resturants,Hospitals,Gas Stations) Phone numbers related to those places
Awais Ahmad
  • 427
  • 3
  • 17
-2
votes
1 answer

How to continuously calculate distance between location updates to get a total distance

How to continuously calculate distance between location updates to get a total distance . I tried to capture coordinate at time t-1 (previous location) and at time t (current location) by using listview but couldn't get good results. I have…
At Line
  • 9
  • 1
-2
votes
1 answer

requestLocationUpdates 2nd paramater is in km or m

locationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, time, distance, locationListener); here time is in milliseconds or second? distance is in km or m?
Midhilaj
  • 4,905
  • 9
  • 45
  • 88
-2
votes
2 answers

I don't get latitude and longitude

Actually I don't get latitude and longitude from this code. package com.example.reyadmahabub.location; import android.Manifest; import android.content.pm.PackageManager; import android.location.Location; import…
-2
votes
1 answer

Make my activity run in background to collect gps

I've created android apps which will collect GPS and store in MySQL database. It manages to collect and store right now. But how I make the GPS collector, collect in the background even the apps are killed. I had coded the GPS collector in my main…
Kevin Lee
  • 11
  • 1