diff --git a/app/build.gradle b/app/build.gradle index a333d4f..d457145 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,4 +45,7 @@ dependencies { implementation "com.squareup.okhttp3:okhttp:3.11.0" implementation "com.squareup.okhttp3:okhttp-urlconnection:3.10.0" implementation "com.squareup.okhttp3:logging-interceptor:3.11.0" + implementation "android.arch.work:work-runtime:1.0.0-alpha09" + implementation "com.google.android.gms:play-services-location:15.0.1" + } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 55a5adf..4b477db 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -9,7 +9,7 @@ - + () { + @Override + public void onSuccess(Location location) { + // Got last known location. In some rare situations this can be null. + if (location != null) { + // Logic to handle location object + Log.d("LocationUpload", "Location updated: long -> " + location.getLongitude() + "latit - >"+ location.getLatitude()); + + } + } + }); + } + catch(SecurityException e){ + Log.d("LocationException","Location not sent due to perrmision exception "); + return Result.FAILURE; + } + return Result.SUCCESS; + } +}