Android Easylocation

Google play service - location services wrapper
Alternatives To Android Easylocation
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Android Reactivelocation2,11711713 years ago11September 29, 201732Java
Small library that wraps Google Play Service API in brilliant RxJava Observables reducing boilerplate to minimum.
Geo Heatmap1,919
9 months ago11mitPython
:world_map: Generate an interactive geo heatmap from your Google location data
React Native Google Places Autocomplete1,8322723210 days ago76August 11, 2021119mitJavaScript
Customizable Google Places autocomplete component for iOS and Android React-Native apps
React Native Maps Directions1,05710959 months ago18April 14, 202045mitJavaScript
Directions Component for `react-native-maps`
Google Directions Android963
1862 years ago7January 17, 201620mitJava
This project allows you to calculate the route between two locations and displays it on a map.
Pokemon Go Node Api88648104 years ago15August 10, 201651mitJavaScript
Pokemon GO api node.js library
Leku728
14 days ago6March 15, 202236apache-2.0Kotlin
:earth_africa: Map location picker component for Android. Based on Google Maps. An alternative to Google Place Picker.
Location History Visualizer647
3 years ago5JavaScript
Visualize your Google Location History using an interactive heatmap
Googleapi47812113 days ago136September 27, 20222mitC#
C# .NET Core Google Api (Maps, Places, Roads, Search, Translate). Supports all endpoints and requests / responses.
Actingweb_firstapp392
15 days ago4otherDart
Starter app for Flutter that includes many different production app features; some not typically included in demo apps.
Alternatives To Android Easylocation
Select To Compare


Alternative Project Comparisons
Readme

Android-EasyLocation

Getting location updates requires lots of bolierplate code in Android, You need to take care of

  • Google Play services availablity Check, Update Google play Service Dialog
  • Creation of GoogleApiClient and its callbacks connected,disconnected etc.
  • Stopping and releasing resources for location updates
  • Handling Location permission scenarios
  • Checking Location services are On or Off
  • Getting lastknown location is not so easy either
  • Fallback to last known location if not getting location after certain duration

Android-EasyLocation does all this stuff in background, so that you can concentrate on your business logic than handling all above

Getting started

In your build.gradle:

com.google.android.gms:play-services-location dependency also needs to be added like this

x.x.x can be replaced with google play service version your app is using versions information available here

 dependencies {
    compile 'com.akhgupta:android-easylocation:1.0.1'
    compile "com.google.android.gms:play-services-location:x.x.x"
 }

Extend your Activity from EasyLocationAppCompatActivity or EasyLocationActivity:

Create location request according to your needs

LocationRequest locationRequest = new LocationRequest()
        .setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY)
        .setInterval(5000)
        .setFastestInterval(5000);

Create EasyLocation request, and set locationRequest created

EasyLocationRequest easyLocationRequest = new EasyLocationRequestBuilder()
        .setLocationRequest(locationRequest)
        .setFallBackToLastLocationTime(3000)
        .build();
}

Request Single location update like this

requestSingleLocationFix(easyLocationRequest);

Or Request Multiple location updates like this

requestLocationUpdates(easyLocationRequest);

You're good to go!, You will get below callbacks now in your activity

    @Override
    public void onLocationPermissionGranted() {
    }

    @Override
    public void onLocationPermissionDenied() {
    }

    @Override
    public void onLocationReceived(Location location) {
    }

    @Override
    public void onLocationProviderEnabled() {
    }

    @Override
    public void onLocationProviderDisabled() {
    }

Additional Options

Specify what messages you want to show to user using EasyLocationRequestBuilder

EasyLocationRequest easyLocationRequest = new EasyLocationRequestBuilder()
.setLocationRequest(locationRequest)
.setLocationPermissionDialogTitle(getString(R.string.location_permission_dialog_title))
.setLocationPermissionDialogMessage(getString(R.string.location_permission_dialog_message))
.setLocationPermissionDialogNegativeButtonText(getString(R.string.not_now))
.setLocationPermissionDialogPositiveButtonText(getString(R.string.yes))
.setLocationSettingsDialogTitle(getString(R.string.location_services_off))
.setLocationSettingsDialogMessage(getString(R.string.open_location_settings))
.setLocationSettingsDialogNegativeButtonText(getString(R.string.not_now))
.setLocationSettingsDialogPositiveButtonText(getString(R.string.yes))
.build();

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Popular Location Projects
Popular Google Projects
Popular Libraries Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Google
Play Framework
Location