Robert Valentino Well-Known Member Licensed User Longtime User Sep 19, 2020 #1 In a standard B4X App I have a help directory located under my Files directory that contains all my htm / html files. I use to load them doing this: Code: Log("Help LoadURL - file:///android_asset/help/" &HelpPage) mWebView.LoadUrl("file:///android_asset/help/" &HelpPage) Now this doesn't seem to work under B4XPages. When I do a ListFiles on the Assets directory I do not even see the help sub directory. Does this directory not get copied on B4XPages? Code: For Each FileName As String In File.ListFiles(File.DirAssets) Log("File:" &FileName) Next How would load and display a help page under B4XPages? Normally I have a Class Module that I initialize and call to display the help page (on the specific Activity) Not sure the proper way to do this in B4XPages. BobVal
In a standard B4X App I have a help directory located under my Files directory that contains all my htm / html files. I use to load them doing this: Code: Log("Help LoadURL - file:///android_asset/help/" &HelpPage) mWebView.LoadUrl("file:///android_asset/help/" &HelpPage) Now this doesn't seem to work under B4XPages. When I do a ListFiles on the Assets directory I do not even see the help sub directory. Does this directory not get copied on B4XPages? Code: For Each FileName As String In File.ListFiles(File.DirAssets) Log("File:" &FileName) Next How would load and display a help page under B4XPages? Normally I have a Class Module that I initialize and call to display the help page (on the specific Activity) Not sure the proper way to do this in B4XPages. BobVal
LucaMs Expert Licensed User Longtime User Sep 19, 2020 #2 https://www.b4x.com/android/forum/t...ifferent-behaviour-b4a-baj.113907/post-711420 Upvote 0
Robert Valentino Well-Known Member Licensed User Longtime User Sep 19, 2020 #3 That explains to me why I am not seeing the help directory in list files. But why the help isn't working Upvote 0
That explains to me why I am not seeing the help directory in list files. But why the help isn't working
Robert Valentino Well-Known Member Licensed User Longtime User Sep 19, 2020 #4 Forgot to add these lines to my main Code: #if Debug #DebuggerForceStandardAssets : true #else #DebuggerForceStandardAssets : false #end if Last edited: Sep 19, 2020 Upvote 0
Forgot to add these lines to my main Code: #if Debug #DebuggerForceStandardAssets : true #else #DebuggerForceStandardAssets : false #end if
Erel B4X founder Staff member Licensed User Longtime User Sep 20, 2020 #5 Correct solution is to use XUI.FileUri. Upvote 0