So i got so many errors like this below

Fatal Exception: java.lang.SecurityException: Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location operations. at android.os.Parcel.readException(Parcel.java:1425) at android.os.Parcel.readException(Parcel.java:1379) at com.google.android.gms.location.internal.zzi$zza$zza.zza(Unknown Source) at com.google.android.gms.location.internal.zzk.getLastLocation(Unknown Source) at com.google.android.gms.location.internal.zzl.disconnect(Unknown Source) at com.google.android.gms.location.internal.zzd$1.zza(Unknown Source) at com.google.android.gms.location.internal.zzd$1.zza(Unknown Source) at com.google.android.gms.internal.zznt$zza.zzre(Unknown Source) at com.google.android.gms.internal.zzoc.connect(Unknown Source) at com.google.android.gms.internal.zzoc.zzd(Unknown Source) at com.google.android.gms.internal.zzoh.zzd(Unknown Source) at com.google.android.gms.internal.zzof.zzd(Unknown Source) at com.google.android.gms.location.internal.zzd.getLastLocation(Unknown Source) at com.pushwoosh.location.LocationTracker.updateLocationTracking(LocationTracker.java:115) at com.pushwoosh.location.LocationTracker.onConnected(LocationTracker.java:101) at com.google.android.gms.common.internal.zzl.zztI(Unknown Source) at com.google.android.gms.internal.zzof.zzc(Unknown Source) at com.google.android.gms.internal.zzod.zzsb(Unknown Source) at com.google.android.gms.internal.zzod.begin(Unknown Source) at com.google.android.gms.internal.zzoh.zzc(Unknown Source) at com.google.android.gms.internal.zznw.onConnected(Unknown Source) at com.google.android.gms.common.internal.zzk$1.onConnected(Unknown Source) at com.google.android.gms.common.internal.zzd$zzj.zzl(Unknown Source) at com.google.android.gms.common.internal.zzd$zza.zztp(Unknown Source) at com.google.android.gms.common.internal.zzd$zza.zztp(Unknown Source) at com.google.android.gms.common.internal.zzd$zze.zztr(Unknown Source) at com.google.android.gms.common.internal.zzd$zzd.handleMessage(Unknown Source) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4963) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) at dalvik.system.NativeStart.main(NativeStart.java)

So seems like Pushwoosh tried to access Location even when I don't need it to do that. How to avoid this? Thanks.

asked 20 Jun '16, 11:06
khairil's gravatar image

khairil
214

Please update to 4.3.1 version. The problems are fixed there. Pushwoosh does not access Location unless you call startTrackingGeoPushes method.

https://github.com/Pushwoosh/pushwoosh-android-sdk/blob/master/Documentation/PushManager.md#starttrackinggeopushes

permanent link
answered 29 Jun '16, 12:11
shader's gravatar image

shader
3.9k7

Hi,

Please update your Pushwoosh SDK to the latest version, you can grab it from our GitHub repo:

https://github.com/Pushwoosh/pushwoosh-android-sdk

permanent link
answered 29 Jun '16, 12:12
Vitaly%20Romanychev's gravatar image

Vitaly Roman...
2213

Hi Thanks for this info. So if I understand from the previous version, when we use startTrackingGeoPushes Pushwoosh will save the state to SharedPreferences. So If for the next version I remove all startTrackingGeoPushes and stopTrackingGeoPushes calls, and remove Location permission from my project. Is everything gonna be alright? I afraid that even I do everything I said before, Pushwoosh will still try to access User location since the SharedPreferences already saved.

(29 Jun '16, 12:41) khairil khairil's gravatar image
2

Yes, that should do everything fine. You can also add stopTrackingGeoPushes call after onStartup call as an extra safety.

(29 Jun '16, 12:48) shader shader's gravatar image
1

Sure, with the latest update if an app has no permissions and have startLocationTracking/stopLocationTracking methods called it will still work without crashes.

(29 Jun '16, 12:49) Vitaly Roman... Vitaly%20Romanychev's gravatar image

Great. Thank you so much for this. Cheers. :)

(30 Jun '16, 03:52) khairil khairil's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×446
×326
×30

question asked: 20 Jun '16, 11:06

question was seen: 1,128 times

last updated: 30 Jun '16, 03:52