Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Uber Like Cab Service | 85 | 3 years ago | 21 | Java | ||||||
Uber Like Android App with PHP backend | ||||||||||
Mapsmeasure | 69 | 24 days ago | 6 | apache-2.0 | Java | |||||
A simple Android app to measure distances on Google Maps | ||||||||||
Takeaway Kotlin | 45 | 6 months ago | n,ull | bsd-3-clause | Kotlin | |||||
🍕this order food 🥗 and 🍹drink app made with Kotlin & Firebase was some part inspired by this design: https://www.sketchappsources.com/free-source/3486-cheeza-pizza-app-sketch-freebie-resource.html | ||||||||||
Google Maps Android Charts | 41 | 4 years ago | 1 | apache-2.0 | Java | |||||
🗺 Google Maps Chart for Android - Render marker clusters as charts categorized on the Google Maps | ||||||||||
Flutter Google Maps Demo | 38 | 5 years ago | 5 | Dart | ||||||
Photo_exif_toolkit | 33 | 6 years ago | 2 | gpl-3.0 | Kotlin | |||||
Photo Exif Toolkit Android app entirely written using Kotlin language | ||||||||||
Tracking Location Provider Android | 31 | 5 years ago | 3 | Java | ||||||
Tracking the android mobile and animating marker smoothly in Google Maps. Tracking has been done both in foreground and background. Tested in Android Oreo 8.1, Android 6.0 and Android 5.0 | ||||||||||
Snazzymaps Browser | 25 | 7 years ago | 1 | apache-2.0 | Java | |||||
Android app for searching and browsing Snazzy Maps | ||||||||||
Google Maps Tracker | 23 | 8 years ago | other | Java | ||||||
Android app to report/track your location using Google Maps API | ||||||||||
Meetme | 20 | 6 years ago | Java | |||||||
An Android apps that using google maps to track realtime location between two people that wanna meet with chat feature, and realtime tracking |
In this demo, I have covered both foreground tracking and background tracking.
Foreground Tracking will work only if app is in foreground. To start foreground tracking, tap on the "START FOREGROUND TRACKING" button. Before requesting for location updates, check location settings of the device as below.
mLocationRequest = new LocationRequest();
mLocationRequest.setInterval(30000);
mLocationRequest.setFastestInterval(15000);
mLocationRequest.setSmallestDisplacement(50); // set this as 100 to 200 if user use app while driving or motor riding
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder()
.addLocationRequest(mLocationRequest);
SettingsClient client = LocationServices.getSettingsClient(this);
Task<LocationSettingsResponse> task = client.checkLocationSettings(builder.build());
task.addOnSuccessListener(this, new OnSuccessListener<LocationSettingsResponse>() {
@Override
public void onSuccess(LocationSettingsResponse locationSettingsResponse) {
// All location settings are satisfied. The client can initialize
// location requests here.
// ...
bService.setVisibility(View.GONE);
startLocationUpdates();
}
});
task.addOnFailureListener(this, new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
int statusCode = ((ApiException) e).getStatusCode();
switch (statusCode) {
case CommonStatusCodes.RESOLUTION_REQUIRED:
// Location settings are not satisfied, but this can be fixed
// by showing the user a dialog.
try {
// Show the dialog by calling startResolutionForResult(),
// and check the result in onActivityResult().
ResolvableApiException resolvable = (ResolvableApiException) e;
resolvable.startResolutionForResult(MainActivity.this,
REQUEST_CHECK_SETTINGS);
} catch (IntentSender.SendIntentException sendEx) {
// Ignore the error.
}
break;
case LocationSettingsStatusCodes.SETTINGS_CHANGE_UNAVAILABLE:
// Location settings are not satisfied. However, we have no way
// to fix the settings so we won't show the dialog.
break;
}
}
});
Note: No need to show notication, as location is taken when the app is in foreground.
Background Tracking is need when you want to track user location even after your app is closed or killed from task. For background tracking you must notify users via foreground notification while getting location. For this purpose we are using foreground service named(LocationJobService.java). Android versions > 7.1 restricts background location process even though foreground service is used. You cannot override this, and you will get 3 0r 4 location updates for 1 hour period. For more information, refer here