Android Question my location requires permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION

larprogramer

Member
Licensed User
B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.RuntimeException: java.lang.SecurityException: my location requires permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION
    at anywheresoftware.b4a.objects.MapFragmentWrapper$1.onMapReady(MapFragmentWrapper.java:197)
    at com.google.android.gms.maps.zzab.zza(Unknown Source:14)
    at com.google.android.gms.maps.internal.zzaq.dispatchTransaction(Unknown Source:25)
    at com.google.android.gms.internal.maps.zzb.onTransact(Unknown Source:49)
    at android.os.Binder.transact(Binder.java:627)
    at fb.b(:com.google.android.gms.dynamite_mapsdynamite@12874026@12.8.74 (040700-204998136):20)
    at com.google.android.gms.maps.internal.bg.a(:com.google.android.gms.dynamite_mapsdynamite@12874026@12.8.74 (040700-204998136):5)
    at com.google.maps.api.android.lib6.impl.be.run(:com.google.android.gms.dynamite_mapsdynamite@12874026@12.8.74 (040700-204998136):5)
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.SecurityException: my location requires permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION
    at com.google.maps.api.android.lib6.impl.bc.c(:com.google.android.gms.dynamite_mapsdynamite@12874026@12.8.74 (040700-204998136):692)
    at com.google.android.gms.maps.internal.l.a(:com.google.android.gms.dynamite_mapsdynamite@12874026@12.8.74 (040700-204998136):138)
    at fc.onTransact(:com.google.android.gms.dynamite_mapsdynamite@12874026@12.8.74 (040700-204998136):12)
    at android.os.Binder.transact(Binder.java:627)
    at com.google.android.gms.internal.maps.zza.transactAndReadExceptionReturnVoid(Unknown Source:15)
    at com.google.android.gms.maps.internal.zzg.setMyLocationEnabled(Unknown Source:19)
    at com.google.android.gms.maps.GoogleMap.setMyLocationEnabled(Unknown Source:6)
    at anywheresoftware.b4a.objects.MapFragmentWrapper$1.onMapReady(MapFragmentWrapper.java:184)
    ... 14 more
ffff.png
 

mcorbeel

Active Member
Licensed User
Longtime User
Same problem here: Client must have ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to perform any location operations.
However I do not have the Activity_PermissionResult and do not use the designer.
Strange is that it worked before... and suddenly I got this error? Don't know where to look for the cause...
 
Upvote 0

mcorbeel

Active Member
Licensed User
Longtime User
This is the full error message:

B4X:
java.lang.SecurityException: Client must have ACCESS_FINE_LOCATION permission to request PRIORITY_HIGH_ACCURACY locations.
    at android.os.Parcel.readException(Parcel.java:1620)
    at android.os.Parcel.readException(Parcel.java:1573)
    at com.google.android.gms.internal.location.zza.transactAndReadExceptionReturnVoid(Unknown Source)
    at com.google.android.gms.internal.location.zzap.zza(Unknown Source)
    at com.google.android.gms.internal.location.zzas.zza(Unknown Source)
    at com.google.android.gms.internal.location.zzaz.zza(Unknown Source)
    at com.google.android.gms.internal.location.zzr.doExecute(Unknown Source)
    at com.google.android.gms.common.api.internal.BaseImplementation$ApiMethodImpl.run(com.google.android.gms:play-services-base@@17.1.0:19)
    at com.google.android.gms.common.api.internal.zaaf.execute(com.google.android.gms:play-services-base@@17.1.0:20)
    at com.google.android.gms.common.api.internal.zabe.execute(com.google.android.gms:play-services-base@@17.1.0:23)
    at com.google.android.gms.common.api.internal.zaaw.execute(com.google.android.gms:play-services-base@@17.1.0:74)
    at com.google.android.gms.internal.location.zzq.requestLocationUpdates(Unknown Source)
    at uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper.RequestLocationUpdates(FusedLocationProviderWrapper.java:202)
    at dylius.mob.android.page_gps_getlocation._fusedlocationprovider1_connectionsuccess(page_gps_getlocation.java:478)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
    at uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProvider.onConnected(FusedLocationProvider.java:64)
    at com.google.android.gms.common.internal.GmsClientEventManager.onConnectionSuccess(com.google.android.gms:play-services-base@@17.1.0:33)
    at com.google.android.gms.common.api.internal.zaaw.zab(com.google.android.gms:play-services-base@@17.1.0:292)
    at com.google.android.gms.common.api.internal.zaak.zaao(com.google.android.gms:play-services-base@@17.1.0:125)
    at com.google.android.gms.common.api.internal.zaak.onConnected(com.google.android.gms:play-services-base@@17.1.0:105)
    at com.google.android.gms.common.api.internal.zabe.onConnected(com.google.android.gms:play-services-base@@17.1.0:101)
    at com.google.android.gms.common.api.internal.zap.onConnected(com.google.android.gms:play-services-base@@17.1.0:6)
    at com.google.android.gms.common.internal.zaf.onConnected(com.google.android.gms:play-services-base@@17.1.0:2)
    at com.google.android.gms.common.internal.BaseGmsClient$zzg.zzj(com.google.android.gms:play-services-basement@@17.1.0:24)
    at com.google.android.gms.common.internal.BaseGmsClient$zza.zza(com.google.android.gms:play-services-basement@@17.1.0:12)
    at com.google.android.gms.common.internal.BaseGmsClient$zzb.zzo(com.google.android.gms:play-services-basement@@17.1.0:11)
    at com.google.android.gms.common.internal.BaseGmsClient$zzc.handleMessage(com.google.android.gms:play-services-basement@@17.1.0:49)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at com.google.android.gms.internal.common.zzi.dispatchMessage(com.google.android.gms:play-services-basement@@17.1.0:8)
    at android.os.Looper.loop(Looper.java:158)
    at android.app.ActivityThread.main(ActivityThread.java:7224)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
1. You should never post a new question in an existing thread. Always start your own thread. You can post a link to this thread if they are similar.
2. Where is your projectupload?
3. Did you request the permission with Runtimepermissions?

android.jar / targetSdkVersion / minSdkVersion

Especially RuntimePermissions
 
Upvote 0

mcorbeel

Active Member
Licensed User
Longtime User
Okay sorry for the reply on the old thread... thought it would be okay because it is similar.
Will start a new thread ...
 
Upvote 0
Top