Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : Path Tracking Using FusedLocationApi and showing result in google maps #478

Merged
merged 1 commit into from
Jan 24, 2017

Conversation

therajanmaurya
Copy link
Member

@therajanmaurya therajanmaurya commented Jan 24, 2017

feat : Path Tracking Using FusedLocationApi and showing result in google maps

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Apply the MifosStyle.xml style template to your code in Android Studio.

  • Run the unit tests with ./gradlew check to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

@therajanmaurya therajanmaurya changed the title feat : Path Tracking Using FusedLocationApi and showing result in goo… feat : Path Tracking Using FusedLocationApi and showing result in google maps Jan 24, 2017
@vikasdesale
Copy link

@vikasdesale
Copy link

3-03 17:56:37.459 15522-15522/com.mifos.mifosxdroid E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mifos.mifosxdroid, PID: 15522
java.lang.NullPointerException
at com.mifos.mifosxdroid.activity.pathtracking.PathTrackingService.onConnected(PathTrackingService.java:141)
at com.google.android.gms.common.internal.zzm.zzq(Unknown Source)
at com.google.android.gms.internal.zzaal.zzo(Unknown Source)
at com.google.android.gms.internal.zzaaj.zzvE(Unknown Source)
at com.google.android.gms.internal.zzaaj.onConnected(Unknown Source)
at com.google.android.gms.internal.zzaan.onConnected(Unknown Source)
at com.google.android.gms.internal.zzzy.onConnected(Unknown Source)
at com.google.android.gms.common.internal.zzl$1.onConnected(Unknown Source)
at com.google.android.gms.common.internal.zzf$zzj.zzwZ(Unknown Source)
at com.google.android.gms.common.internal.zzf$zza.zzc(Unknown Source)
at com.google.android.gms.common.internal.zzf$zza.zzu(Unknown Source)
at com.google.android.gms.common.internal.zzf$zze.zzxa(Unknown Source)
at com.google.android.gms.common.internal.zzf$zzd.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)

@rahulbabbar1
Copy link
Contributor

@therajanmaurya while trying to reproduce the above error. I found another error (when gps is off) :
" java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()' on a null object reference at com.mifos.mifosxdroid.activity.pathtracking.PathTrackingService.onConnected(PathTrackingService.java:128) "

The reason for this error is when gps is disabled the following method returns a null object.
currentLocation = LocationServices.FusedLocationApi.getLastLocation(googleApiClient);

And there is no check to see if user's gps is enabled or not. Thus asking them to enable it.

@vikasdesale
Copy link

this is issue also comes if gps on @rahulbabbar1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants