mobfox / MobFox-Android-SDK

26 stars 21 forks source link

Need a way to disable get location #77

Open weakapp opened 6 years ago

weakapp commented 6 years ago

When requesting ads, mobfox service will always try to get location. Need a way to disable it or need to check if has permissions to do that.

nabriski commented 6 years ago

Hi,

In our latest versions location is only used if your app allows access to location. We should never prompt ourselves the location permission dialog. Which SDK version are you using?

Thanks

weakapp commented 6 years ago

Hi. I am using sdk 3.6.0 There is no location permission dialog. but from adb log, I can see mobfox is trying to get location but got exceptions.

by the way, I am using com.mobfox.sdk.banner.Banner to get ads.

nabriski commented 6 years ago

And you don't have location permissions on your app?

weakapp commented 6 years ago

Hi.

No, I don't. I don't need location permissions on my apps.

Itamar Nabriski notifications@github.com 於 2018年7月18日 週三 18:18 寫道:

And you don't have location permissions on your app?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mobfox/MobFox-Android-SDK/issues/77#issuecomment-405883544, or mute the thread https://github.com/notifications/unsubscribe-auth/ACkkPCkbXo0alcZ069-fehhSIUcS9LG_ks5uHwuNgaJpZM4VUHJq .

nabriski commented 6 years ago

Hi,

Is the only problem the printouts in the log or does it manifest itself elsewhere? Can you please paste the error messages here?

Thanks

weakapp commented 6 years ago

Hi.

This is the message I got. It will not cause app to crash, but just want to disable it.

07-18 13:59:34.303 15789 15789 W System.err: java.lang.SecurityException: "gps" location provider requires ACCESS_FINE_LOCATION permission. 07-18 13:59:34.303 15789 15789 W System.err: at android.os.Parcel.readException(Parcel.java:1942) 07-18 13:59:34.303 15789 15789 W System.err: at android.os.Parcel.readException(Parcel.java:1888) 07-18 13:59:34.303 15789 15789 W System.err: at android.location.ILocationManager$Stub$Proxy.getLastLocation(ILocationManager.java:802) 07-18 13:59:34.303 15789 15789 W System.err: at android.location.LocationManager.getLastKnownLocation(LocationManager.java:1205) 07-18 13:59:34.303 15789 15789 W System.err: at com.mobfox.sdk.services.MobFoxLocationService.getLocation(MobFoxLocationService.java:209) 07-18 13:59:34.303 15789 15789 W System.err: at com.mobfox.sdk.banner.Banner.loadWhenReady(Banner.java:228) 07-18 13:59:34.303 15789 15789 W System.err: at com.mobfox.sdk.banner.Banner$5.mobFoxRun(Banner.java:217) 07-18 13:59:34.303 15789 15789 W System.err: at com.mobfox.sdk.runnables.MobFoxRunnable.run(MobFoxRunnable.java:23) 07-18 13:59:34.303 15789 15789 W System.err: at android.os.Handler.handleCallback(Handler.java:789) 07-18 13:59:34.303 15789 15789 W System.err: at android.os.Handler.dispatchMessage(Handler.java:98) 07-18 13:59:34.303 15789 15789 W System.err: at android.os.Looper.loop(Looper.java:164) 07-18 13:59:34.303 15789 15789 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6541) 07-18 13:59:34.303 15789 15789 W System.err: at java.lang.reflect.Method.invoke(Native Method) 07-18 13:59:34.303 15789 15789 W System.err: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 07-18 13:59:34.303 15789 15789 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Itamar Nabriski notifications@github.com 於 2018年7月18日 週三 下午8:40寫道:

Hi,

Is the only problem the printouts in the log or does it manifest itself elsewhere? Can you please paste the error messages here?

Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mobfox/MobFox-Android-SDK/issues/77#issuecomment-405916316, or mute the thread https://github.com/notifications/unsubscribe-auth/ACkkPM1tmLxVr97taJyvusfJ76N179XZks5uHyyigaJpZM4VUHJq .

nabriski commented 6 years ago

Hi,

Ok, I opened an issue for our developers, will update this issue when it's released.