Questions tagged [android-location]

android-location refers to the location API provided by the Android framework.

References

1355 questions
-1
votes
1 answer

No Location Found In Geocoder Asyncktask Activity

i want to build a app which shows me user location on google map...but it shows me no address is found ..even when i tried to give fixed value ... if(location!=null && !location.equals("")){ googleMap.clear(); …
-1
votes
1 answer

Android how to listen the GPS state change?

I want to listen the state change of GPS dynamically, just like use broadcast. If I use mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER), that can't get state change infomation in real time. I think maybe use GpsStatus.Listener(),…
Kevin.Z
  • 135
  • 9
-1
votes
2 answers

Android How to getLat() and get Long()

Im trying to mail a user my long and lat and im getting nullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()' on a null object reference I guess that the method getLastKnownLocation() returns null…
Spoofy
  • 621
  • 4
  • 9
  • 27
-1
votes
2 answers

Getting current location continuously in background

In my project, i have used a service to retrieving location continuously in background. My LocationService is as follows: public class LocationService extends Service { private static final int TWO_MINUTES = 1000 * 60 * 2; public…
-1
votes
1 answer

Android FusedLocationProvider and battery life

I've found several different SO posts on conserving battery life with Android's FusedLocationProvider API. What I'm looking is a way to intelligently select the most location accurate provider, given the state of the host's battery and some…
-1
votes
1 answer

Android LocationListner ... Feeling Sucked :(

Does anybody is able to find a working solution for guraneteed call to onLocationChanged(...) method of LocationListener? Looks like many peoples are facing this issue. https://code.google.com/p/android/issues/detail?id=57707 my implentation is…
andaspire
  • 11
  • 3
-1
votes
2 answers

Unable to get GPS location

I want user location. both network and GPS location. i am getting network location but GPS location is always null. here is the code that i write for that. public class GetLocation extends Service implements LocationListener { LocationManager…
Usman Riaz
  • 2,920
  • 10
  • 43
  • 66
-1
votes
1 answer

Connectivity manager gives null pointer exception in android

My Code to check internet connection. public boolean internet() { boolean flag = false; //context=FindPeopleFragment_revice.this; // FindPeopleFragment_revice.context = this; ConnectivityManager cm = (ConnectivityManager)…
user3916943
  • 61
  • 2
  • 9
-1
votes
1 answer

Android location app freezing

I'm developing a simple "Check-In" app and I'm facing some troubles. When I tap a ImageButton to get the location, my Logcat starts to response: GC_EXPLICIT freed 365K, 18% free 14183K/17256K, paused 2ms+4ms, total 24ms to [...] GC_EXPLICIT freed…
Ramon Villain
  • 43
  • 1
  • 4
-1
votes
1 answer

Getting a nullpointexception with location services with API 19 (S5 in particular)

I am getting an issue with my app on S5 devices (test on two), but it works fine on s4 and s3. I think it has something to do with Kitkat API 19 vs 18. I tested various configurations and while it would work on the S3 every single time, the S5 would…
smusing
  • 15
  • 1
  • 4
-1
votes
2 answers

Android: Service to get and send GPS co-ordinates to server

I know this is duplicate question, but I am not getting the explanatory example or solution. I want to develop an application which after run calls a background service which takes the GPS location of device and send it via PHP web service to the…
Manoj Fegde
  • 4,786
  • 15
  • 50
  • 95
-1
votes
2 answers

Android List View Exception

I'm trying to develop android app. I want to display user contact in a nice way , I'm using ListView but there is exception. here is code : package com.example.list; import java.util.ArrayList; import java.util.List; import…
-1
votes
1 answer

I have "network" location provider but got : Provider "network" unknown, why?

I have a AndroidTestCase , I run my test in real device with Android 4.1.2 OS. public class MyLocationTest extends AndroidTestCase{ private String TEST_PROVIDER = LocationManager.NETWORK_PROVIDER; @Override public void setUp() throws…
Mellon
  • 37,586
  • 78
  • 186
  • 264
-1
votes
3 answers

Trying to get GPS Location and show it in a TextView

I am very new to Android development. So forgive this repetitive question. I've tried many of the solutions on this but none seem to work quite right for me...They all crash on emulator and on my phone. I'm working on an App and just want to get my…
user583507
-1
votes
1 answer

android google maps v2 in service

So i noticed that google maps for android has a v2. i was wondering if there is a difference between requestlocationupdate and setmylocationenabled. I want to create a service that requests user location but i know that sometimes the gps chips have…