I have an application where I check if User has GPS and Wireless Location enabled on device or not.If it's not enable then I startActivity to enable them .My code for this is:
if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)
…
I want to create a simple app to upload my location .I have two activities and in first activity the user can input parameters url for upload with editbox , a checkbox if user wish upload location save preferences button and start button for go to…
I don't understand why the app closes:
java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLongitude()' on a null object reference
private void getWeatherInformation() {
…
locationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER, time, distance, locationListener);
here
time is in milliseconds or second?
distance is in km or m?
Android-Oreo has essentially broken my App and left me dead in the water..
My Objective: Run in the background, and react when the "Location" setting gets turned ON.
I do not need to actually use the Location - I simply need to detect when it…
maybe somebody can tell my why below code works on Api above 25, but on Api 19 which a right now i'm testing i have null after that i try to get longitude and latitude?
I had read official docs but but each method which i used (target Api 25) is…
My application server having thousands of users with their location(LatLng).
I want nearest 50 users from any user's location to be displayed in app?
How i can fast filter to get the nearest 50 users(LatLng) from server database?
I tried with Sort…
I have got the API key but still I am unable to open the google map in my project. my requirement is I have to get the current location and nearby hospital details in my app using google map and I want the list of hospitals near to that place in…
I am stuck with location with GPS/Network Providers. I know it is a basic question for all androiders but i am having this problem since long time.
Actually I am taking current location and inserting in database by following method on click of…
I'm new to android Location API and Maps. I was thinking about making an application which can be used to share location of friends and locate them on Google Maps. There are many kinds of apps which exists in the market like Find My Friends by Apple…
I want to calculate the speed of user on WiFi. I am getting location updates via. onLocationChanged() but every time hasSpeed() returning false and getSpeed() returning 0.0.
Is there any API available to get speed on WiFi or I need to calculate…
I have a class for get the user location.
If the GPS is off I turned it on and show the location, but it doesnt work.
this is the class:
public class UseGPS implements Runnable{
Activity activity;
Context context;
private ProgressDialog…
I'm trying to convert an old version of this code from GMaps v1.1 to GMaps v2. I am having issues converting the following MapController code:
private MapController mMapController;
public void setController(Object controller)
{
/*if( controller…
I am trying to access the GPS position of the users device and seem to be getting nowhere.
In my class I have the following code, it checks to see if the GPS Provider is enabled and then attempts to get the users last known location.
It recognizes…
I am building application which is time sensitive i.e. some tasks need to be completed within certain time. There are multiple ways to get the time i.e. System.currentTimeMillis() and gpsLocation.getTime(). I don't want to use…