Android Question dji app crashing

shb777

Active Member
Licensed User
Longtime User
When I run Erel's drone mission, or my DJI app, connected to my drone, it always crashes the first time, then runs OK, usually the 2nd time, sometimes the third time. Any ideas why this would happen?
 

shb777

Active Member
Licensed User
Longtime User
Erel, is there any chance you could add google map, to your drone mission project, to see if it works for you?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is the error I get:


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)
at com.google.android.gms.maps.internal.zzaq.dispatchTransaction(Unknown Source)
at com.google.android.gms.internal.maps.zzb.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at fb.b:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-204998136):20)
at com.google.android.gms.maps.internal.bg.a:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-204998136):5)
at com.google.maps.api.android.lib6.impl.be.run:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-204998136):5)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
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@[email protected] (040308-204998136):692)
at com.google.android.gms.maps.internal.l.a:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-204998136):138)
at fc.onTransact:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-204998136):12)
at android.os.Binder.transact(Binder.java:387)
at com.google.android.gms.internal.maps.zza.transactAndReadExceptionReturnVoid(Unknown Source)
at com.google.android.gms.maps.internal.zzg.setMyLocationEnabled(Unknown Source)
at com.google.android.gms.maps.GoogleMap.setMyLocationEnabled(Unknown Source)
at anywheresoftware.b4a.objects.MapFragmentWrapper$1.onMapReady(MapFragmentWrapper.java:184)
... 14 more
--------- beginning of crash
FATAL EXCEPTION: main
Process: b4a.dji.waldo, PID: 26442
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)
at com.google.android.gms.maps.internal.zzaq.dispatchTransaction(Unknown Source)
at com.google.android.gms.internal.maps.zzb.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at fb.b:)com.google.android.gms.dynamite_mapsdynamite@[email protected] (040308-204998136):20)


It happens because you cannot set the 'MyLocation Button Enabled' property to True.

See the tutorial: https://www.b4x.com/android/forum/threads/google-maps.63930/#content
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
OK I changed that and it's running OK now. Thanks. I was held up 2 months with this.

this gmap tutorial is dated Feb 24, 2016, so that's well before I started working on
my app, so my app was working with MyLocation button enabled in the designer for a long
time.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Last edited:
Upvote 0

shb777

Active Member
Licensed User
Longtime User
I took my drone out for flight testing today. The new app was constantly crashing. So I installed drone mission, and it too was constantly crashing. I had found out previously that all the apps including drone mission crash after the drone is left on a minute or so.
 
Upvote 0
Top