imgsimonebiliato Well-Known Member Licensed User Longtime User Mar 16, 2016 #1 Hello, i need to download a pdf file from the net and then show it to the usr. I tried to use a web view, but the log result is null: This is my code: Code: Dim DOWNLOAD_ADDRESS As String = "http://www.testwebsite.com/pdf-test.pdf" Dim wb As WebView wb.Initialize("wb") Activity.AddView(wb, 5, 5, 50%x, 50%y) wb.LoadUrl(DOWNLOAD_ADDRESS) Log(wb.Url) It could be better, if the DOWNLOAD_ADDRESS variable, would be the file into DirRootExternal
Hello, i need to download a pdf file from the net and then show it to the usr. I tried to use a web view, but the log result is null: This is my code: Code: Dim DOWNLOAD_ADDRESS As String = "http://www.testwebsite.com/pdf-test.pdf" Dim wb As WebView wb.Initialize("wb") Activity.AddView(wb, 5, 5, 50%x, 50%y) wb.LoadUrl(DOWNLOAD_ADDRESS) Log(wb.Url) It could be better, if the DOWNLOAD_ADDRESS variable, would be the file into DirRootExternal
eurojam Well-Known Member Licensed User Longtime User Mar 16, 2016 #2 may be you can try to use google doc viewer: https://docs.google.com/viewer?url=http://www.testwebsite.com/pdf-test.pdf Upvote 0
may be you can try to use google doc viewer: https://docs.google.com/viewer?url=http://www.testwebsite.com/pdf-test.pdf
imgsimonebiliato Well-Known Member Licensed User Longtime User Mar 16, 2016 #3 @eurojam What is it? Upvote 0
eurojam Well-Known Member Licensed User Longtime User Mar 16, 2016 #4 imgsimonebiliato said: What is it? Click to expand... what is what? Upvote 0
imgsimonebiliato Well-Known Member Licensed User Longtime User Mar 16, 2016 #5 eurojam said: what is what? Click to expand... The link that you provide me Upvote 0
eurojam Well-Known Member Licensed User Longtime User Mar 16, 2016 #6 it means: Code: Dim DOWNLOAD_ADDRESS As String = "https://docs.google.com/viewer?url=http://www.testwebsite.com/pdf-test.pdf" Dim wb As WebView wb.Initialize("wb") Activity.AddView(wb, 5, 5, 50%x, 50%y) wb.LoadUrl(DOWNLOAD_ADDRESS) Log(wb.Url) but I haven't tested it... If you want to download the pdf, you'll better use httputils and something like an intent to a pdf viewer... Upvote 0
it means: Code: Dim DOWNLOAD_ADDRESS As String = "https://docs.google.com/viewer?url=http://www.testwebsite.com/pdf-test.pdf" Dim wb As WebView wb.Initialize("wb") Activity.AddView(wb, 5, 5, 50%x, 50%y) wb.LoadUrl(DOWNLOAD_ADDRESS) Log(wb.Url) but I haven't tested it... If you want to download the pdf, you'll better use httputils and something like an intent to a pdf viewer...
imgsimonebiliato Well-Known Member Licensed User Longtime User Mar 16, 2016 #7 eurojam said: it means: Code: Dim DOWNLOAD_ADDRESS As String = "https://docs.google.com/viewer?url=http://www.testwebsite.com/pdf-test.pdf" Dim wb As WebView wb.Initialize("wb") Activity.AddView(wb, 5, 5, 50%x, 50%y) wb.LoadUrl(DOWNLOAD_ADDRESS) Log(wb.Url) but I haven't tested it... If you want to download the pdf, you'll better use httputils and something like an intent to a pdf viewer... Click to expand... I prefer using a download manager. Also I don't want to use a third part application Upvote 0
eurojam said: it means: Code: Dim DOWNLOAD_ADDRESS As String = "https://docs.google.com/viewer?url=http://www.testwebsite.com/pdf-test.pdf" Dim wb As WebView wb.Initialize("wb") Activity.AddView(wb, 5, 5, 50%x, 50%y) wb.LoadUrl(DOWNLOAD_ADDRESS) Log(wb.Url) but I haven't tested it... If you want to download the pdf, you'll better use httputils and something like an intent to a pdf viewer... Click to expand... I prefer using a download manager. Also I don't want to use a third part application
imgsimonebiliato Well-Known Member Licensed User Longtime User Mar 16, 2016 #8 But code works Upvote 0
imgsimonebiliato Well-Known Member Licensed User Longtime User Mar 16, 2016 #9 Do you know, if it possible, also to use google viewer, with internal file? Upvote 0