SoyEli Active Member Licensed User Longtime User Aug 18, 2011 #1 Hello I have been looking for a sample on howto: Open a text file in the sd card with "HTMLviewer" Thank you for your help
Hello I have been looking for a sample on howto: Open a text file in the sd card with "HTMLviewer" Thank you for your help
Erel B4X founder Staff member Licensed User Longtime User Aug 18, 2011 #2 Are you asking about Basic4android (WebView) or Basic4ppc? Upvote 0
SoyEli Active Member Licensed User Longtime User Aug 18, 2011 #3 Hello Basic4android Android 2.2 phone Last edited: Aug 18, 2011 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Aug 18, 2011 #4 It should be: Code: WebView.LoadUrl("file://" & File.Combine(File.DirRootExternal, "yourfile.html")) Upvote 0
SoyEli Active Member Licensed User Longtime User Aug 18, 2011 #5 Thank you for your reply: it is a text.txt file not a .html I tried what you said and it does not do anything. I can go in with file manager and select the file and open with HTMLviewer an it opens ok. Thank you again Last edited: Aug 18, 2011 Upvote 0
Thank you for your reply: it is a text.txt file not a .html I tried what you said and it does not do anything. I can go in with file manager and select the file and open with HTMLviewer an it opens ok. Thank you again
SoyEli Active Member Licensed User Longtime User Aug 19, 2011 #6 Any ideas ? of howto open a txt file with HTMLviewer ? The HTMLviewer is in my phone, with code how can I Open it ? THANK YOU Upvote 0
Any ideas ? of howto open a txt file with HTMLviewer ? The HTMLviewer is in my phone, with code how can I Open it ? THANK YOU
K kickaha Well-Known Member Licensed User Longtime User Aug 19, 2011 #7 This line works in one of my apps Code: WebViewHelp.LoadUrl ("file://"&File.Combine (savedir, "summary.txt")) savedir is just File.DirRootExternal. Are you sure the file is where you think it is? Upvote 0
This line works in one of my apps Code: WebViewHelp.LoadUrl ("file://"&File.Combine (savedir, "summary.txt")) savedir is just File.DirRootExternal. Are you sure the file is where you think it is?
SoyEli Active Member Licensed User Longtime User Aug 19, 2011 #9 Hello: this is what I Have: Dim ShowMe As WebView, TxT as string Txt="FileName" ShowMe.Initialize("ShowMe") ShowMe.LoadUrl("file://" & File.Combine(File.DirRootExternal,"FirstFolder\SubFolder\"&Txt&".txt")) Runs with NO errors, just does not do anything. I am 100% I got the path correct. Thank You Upvote 0
Hello: this is what I Have: Dim ShowMe As WebView, TxT as string Txt="FileName" ShowMe.Initialize("ShowMe") ShowMe.LoadUrl("file://" & File.Combine(File.DirRootExternal,"FirstFolder\SubFolder\"&Txt&".txt")) Runs with NO errors, just does not do anything. I am 100% I got the path correct. Thank You
Erel B4X founder Staff member Licensed User Longtime User Aug 19, 2011 #10 You should add the WebView to the Activity. Upvote 0
margret Well-Known Member Licensed User Longtime User Aug 19, 2011 #11 LoadURL Code myw.Initialize("myw") activity.AddView(myw, 0, 0, 600, 980) myw.LoadUrl("file:///android_asset/help.txt") The above code works fine in my app. Thanks, Margret Upvote 0
LoadURL Code myw.Initialize("myw") activity.AddView(myw, 0, 0, 600, 980) myw.LoadUrl("file:///android_asset/help.txt") The above code works fine in my app. Thanks, Margret
SoyEli Active Member Licensed User Longtime User Aug 19, 2011 #12 That worked !!! Thank you :sign0060: Upvote 0