Hi,
I think this is my first time post
My english are not good enaugh and I sorry for this.
I'm about to get webpage Title with this code
This code above is success
I have list of urls form SQLite database and load them to ListView
How to check all this list urls using WebView1.LoadUrl and them back to ListView1.AddTwoLines ?
Like this
I think this is my first time post
My english are not good enaugh and I sorry for this.
I'm about to get webpage Title with this code
B4X:
Sub Globals
Private WebView1 As WebView
Private WebViewExtras1 As WebViewExtras
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
WebView1.Initialize("WebView1")
WebViewExtras1.Initialize(WebView1)
WebViewExtras1.JavaScriptEnabled = True
WebView1.LoadUrl("https://www.youtube.com/")
End Sub
Sub WebView1_PageFinished (Url As String)
Log("PageFinished: "&Url)
WebViewExtras1.ExecuteJavascript("document.title")
End Sub
Sub Button1_Click
MsgboxAsync(WebViewExtras1.GetTitle, "Website Title Is")
End Sub
This code above is success
I have list of urls form SQLite database and load them to ListView
B4X:
https://www.youtube.com
https://www.facebook.com
https://www.instagram.com
https://www.twitter.com
B4X:
Sub Button2_Click
If File.Exists(File.DirInternal, "webpage.db") = True Then
SQL.Initialize(File.DirInternal, "webpage.db", False)
Cursor = SQL.ExecQuery("SELECT url FROM urls_table")
For i = 0 To Cursor.RowCount - 1
Cursor.Position = i
ListView1.AddSingleLine2(Cursor.GetString("url"), i)
Next
Else
MsgboxAsync("Can't open database", "")
Return
End If
End Sub
How to check all this list urls using WebView1.LoadUrl and them back to ListView1.AddTwoLines ?
Like this
B4X:
WebView1.LoadUrl(ListOfUrls)
ListView1.AddTwoLines(Webpage Title, Webpage Url)