I am building an app that requires user location. I am following the Android training documentation from here which says:
shouldShowRequestPermissionRationale return the boolean indicating whether or not we should show UI with rationale for…
Earlier to get user current location I have used LocationManager:
LocationManager locationManager = (LocationManager) getActivity().getSystemService(Context.LOCATION_SERVICE);
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
…
For some reason the implementation of getMaxAddressLineIndex has recently changed. Now this method returns 0 for line 1.
I have an existing code, which used to work: i
In the Criteria class, there are two constants, ACCURACY_HIGH and ACCURACY_FINE, which are apparently used to require the LocationManager to return higher accuracy location updates. Here is what the documentation says about each of these…
What I am trying to do:
I am trying to develop an app that only requires the user's location at the start of one activity. So only when the user is within the activity, the location gets updated either by network or GPS. Accordingly, the user may…
First of all i have check this answer.
What i am trying to do is extending Location class calling it LocationPlus which has some
member variables. functionality i am trying to achieve is pass the object of LocationPlus class from one activity to…
My app only needs a coarse location service when started up.
In detail, I need the app's rough location so as to provide the users with the shop info nearby.
The location does NOT need to be updated constantly. In addition, coarse localization will…
I just updated my Location API to use FusedLocationProviderClient but I am having this issue, when I turn off and on the GPS, I am always getting null location:
val fusedLocationProviderClient =
…
I am currently getting Current Location of device (lat,lng) in MapActivity. Now , I want to let the user move the map, while keeping the marker at the center. This means that whenever the map is moved, current location will be updated. (Right?)
I…
GeoCoder Service not Available
I'm using the GeoCoder to get an AddressLocation.
Unfortunately the method fires an IOException saying: "Service not Available".
This StackOverFlow thread explains what is going on because I tested it thoroughly (user…
Is it even possible? I would like to be able to create a listener which will be notified about location permission changes (whether the app triggers them or not). As far as I can see, there are methods for getting the current permission status and…
I have an activity that extends a base class called LocationAwareActivity all this LocationAwareActivity activity does is creates a location service client
LocationServices.getFusedLocationProviderClient and listens to
location updates.
Source for…
How can I prompt the user to turn on Location?
The app is supposed to filter a list of locations with the current location of the user. If the user has the Location service turned off, the app should prompt the user asking for the Location to be…
I know similar questions have been asked before but answers were not perfect.
I created an app with geofences using the sample code from android developer website. I did not use any shared preferences to store geofences as I am not removing the…