I load an html file into a webview element to insert once loaded information.
Log("DirAssets: " & File.DirAssets)
Log("DirDefaultExternal: " & File.DirDefaultExternal)
Log("DirRootExternal: " & File.DirRootExternal)
Log("DirInternal: " & File.DirInternal)
Log("DirInternalCache: " & File.DirInternalCache)
If FirstTime = True Then
If File.Exists(File.DirDefaultExternal,"*.html") = False Then
File.Copy(File.DirAssets,"index.html", File.DirDefaultExternal,"index.html")
File.Copy(File.DirAssets,"style.css", File.DirDefaultExternal,"style.css")
File.Copy(File.DirAssets,"script.js", File.DirDefaultExternal,"script.js")
Else
' dd
End If
End If
This are the results:
Logger connected to: samsung SM-J730F
--------- beginning of crash
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
is panel
drawing menu
is panel
drawing menu
drawing menu
drawing menu
drawing menu
drawing menu
wired: false
Speaker: false
false
DirAssets: AssetsDir
DirDefaultExternal: /storage/emulated/0/Android/data/com.lttech.md4x/files
DirRootExternal: /storage/emulated/0
DirInternal: /data/user/0/com.lttech.md4x/files
DirInternalCache: /data/user/0/com.lttech.md4x/cache
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
is panel
drawing menu
is panel
drawing menu
drawing menu
drawing menu
drawing menu
drawing menu
wired: false
Speaker: false
false
DirAssets: AssetsDir
DirDefaultExternal: /storage/emulated/0/Android/data/com.lttech.md4x/files
DirRootExternal: /storage/emulated/0
DirInternal: /data/user/0/com.lttech.md4x/files
DirInternalCache: /data/user/0/com.lttech.md4x/cache
Error occurred on line: 68 (Main)
java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.lttech.md4x/files/index.html (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:308)
at java.io.FileOutputStream.<init>(FileOutputStream.java:238)
at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:448)
at anywheresoftware.b4a.objects.streams.File.Copy(File.java:341)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
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 com.lttech.md4x.main.afterFirstLayout(main.java:104)
at com.lttech.md4x.main.access$000(main.java:17)
at com.lttech.md4x.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:214)
at android.app.ActivityThread.main(ActivityThread.java:7156)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
I also do not understand where this text comes from: [com.lttech.md4x]