hi
i use this code Line to get the Path for internal and external SD Card.
(Starter -> Starter Service
rp -> RunntimePermission, Public rp As RuntimePermissions)
Until now it works fine.
Now my Device (Motorola One... with Android 9) has a problem with the external SD Card (internal all o.k.) and the code line crash.
I do not understand why.
(java line 2544 points to the codeline above)
i use this code Line to get the Path for internal and external SD Card.
B4X:
Dim pfade() As String = Starter.rp.GetAllSafeDirsExternal("")
rp -> RunntimePermission, Public rp As RuntimePermissions)
Until now it works fine.
Now my Device (Motorola One... with Android 9) has a problem with the external SD Card (internal all o.k.) and the code line crash.
I do not understand why.
(java line 2544 points to the codeline above)
main$ResumableSub_Activity_Createresume (java line: 2544)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.toString()' on a null object reference
at anywheresoftware.b4a.objects.RuntimePermissions.GetAllSafeDirsExternal(RuntimePermissions.java:121)
at de.soft.myapp.main$ResumableSub_Activity_Create.resume(main.java:2544)
at de.soft.myapp.main._activity_create(main.java:1349)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at de.soft.myapp.main.afterFirstLayout(main.java:104)
at de.soft.myapp.main.access$000(main.java:17)
at de.soft.myapp.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:220)
at android.app.ActivityThread.main(ActivityThread.java:6939)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
main$ResumableSub_Activity_Createresume (java line: 2544)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.toString()' on a null object reference
at anywheresoftware.b4a.objects.RuntimePermissions.GetAllSafeDirsExternal(RuntimePermissions.java:121)
at de.soft.myapp.main$ResumableSub_Activity_Create.resume(main.java:2544)
at de.soft.myapp.main._activity_create(main.java:1349)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at de.soft.myapp.main.afterFirstLayout(main.java:104)
at de.soft.myapp.main.access$000(main.java:17)
at de.soft.myapp.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:220)
at android.app.ActivityThread.main(ActivityThread.java:6939)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.toString()' on a null object reference
at anywheresoftware.b4a.objects.RuntimePermissions.GetAllSafeDirsExternal(RuntimePermissions.java:121)
at de.soft.myapp.main$ResumableSub_Activity_Create.resume(main.java:2544)
at de.soft.myapp.main._activity_create(main.java:1349)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at de.soft.myapp.main.afterFirstLayout(main.java:104)
at de.soft.myapp.main.access$000(main.java:17)
at de.soft.myapp.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:220)
at android.app.ActivityThread.main(ActivityThread.java:6939)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
main$ResumableSub_Activity_Createresume (java line: 2544)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.toString()' on a null object reference
at anywheresoftware.b4a.objects.RuntimePermissions.GetAllSafeDirsExternal(RuntimePermissions.java:121)
at de.soft.myapp.main$ResumableSub_Activity_Create.resume(main.java:2544)
at de.soft.myapp.main._activity_create(main.java:1349)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at de.soft.myapp.main.afterFirstLayout(main.java:104)
at de.soft.myapp.main.access$000(main.java:17)
at de.soft.myapp.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:220)
at android.app.ActivityThread.main(ActivityThread.java:6939)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)