tufanv Expert Licensed User Longtime User Mar 9, 2016 #1 Hello from this example :https://www.b4x.com/android/forum/t...-webview-and-webviewextras.34418/#post-202076 i got an working code . I can make it work on debug mode but for release and release obfuscated mode it gives Only the original thread that created a view hierarchy can touch its views. error The project is included as zip. How can i fix it ? ty Attachments a.zip a.zip 7.1 KB · Views: 319
Hello from this example :https://www.b4x.com/android/forum/t...-webview-and-webviewextras.34418/#post-202076 i got an working code . I can make it work on debug mode but for release and release obfuscated mode it gives Only the original thread that created a view hierarchy can touch its views. error The project is included as zip. How can i fix it ? ty
tufanv Expert Licensed User Longtime User Mar 9, 2016 #2 lemonisdead said: Hello, I don't know if you have already detected this : the error comes from txtkod.Text=Html When you comment that line it works. Click to expand... oh never suspected that. why does parsing a html code into a text makes a probem interesting :/ so how can i copy the code into a text or something what an i missing ? ideas ? Upvote 0
lemonisdead said: Hello, I don't know if you have already detected this : the error comes from txtkod.Text=Html When you comment that line it works. Click to expand... oh never suspected that. why does parsing a html code into a text makes a probem interesting :/ so how can i copy the code into a text or something what an i missing ? ideas ?
DonManfred Expert Licensed User Longtime User Mar 9, 2016 #3 You need to show more real code (the one you are using)... I mean, you java-script calls in webview, the eventsub code... I remember somthing that there is a true/false in the javascript call to indicate UI changes. So something like that... Upvote 0
You need to show more real code (the one you are using)... I mean, you java-script calls in webview, the eventsub code... I remember somthing that there is a true/false in the javascript call to indicate UI changes. So something like that...
tufanv Expert Licensed User Longtime User Mar 9, 2016 #4 DonManfred said: You need to show more real code (the one you are using)... I mean, you java-script calls in webview, the eventsub code... I remember somthing that there is a true/false in the javascript call to indicate UI changes. So something like that... Click to expand... It is the whole code. I got it from the example i posted in the first msg. Upvote 0
DonManfred said: You need to show more real code (the one you are using)... I mean, you java-script calls in webview, the eventsub code... I remember somthing that there is a true/false in the javascript call to indicate UI changes. So something like that... Click to expand... It is the whole code. I got it from the example i posted in the first msg.
DonManfred Expert Licensed User Longtime User Mar 9, 2016 #5 https://www.b4x.com/android/forum/threads/webviewextras.12453/#post70053 Code: Dim Javascript As String Javascript="B4A.CallSub('Process_HTML', false, document.documentElement.outerHTML)" Try to set the second parameter to true Upvote 0
https://www.b4x.com/android/forum/threads/webviewextras.12453/#post70053 Code: Dim Javascript As String Javascript="B4A.CallSub('Process_HTML', false, document.documentElement.outerHTML)" Try to set the second parameter to true
tufanv Expert Licensed User Longtime User Mar 9, 2016 #6 DonManfred said: https://www.b4x.com/android/forum/threads/webviewextras.12453/#post70053 Code: Dim Javascript As String Javascript="B4A.CallSub('Process_HTML', false, document.documentElement.outerHTML)" Try to set the second parameter to true Click to expand... Thanks that fixes Upvote 0
DonManfred said: https://www.b4x.com/android/forum/threads/webviewextras.12453/#post70053 Code: Dim Javascript As String Javascript="B4A.CallSub('Process_HTML', false, document.documentElement.outerHTML)" Try to set the second parameter to true Click to expand... Thanks that fixes
tufanv Expert Licensed User Longtime User Mar 9, 2016 #7 lemonisdead said: Please try this : it is a threading issue only Click to expand... thanks for help fixed :=) Upvote 0
lemonisdead said: Please try this : it is a threading issue only Click to expand... thanks for help fixed :=)
DonManfred Expert Licensed User Longtime User Mar 9, 2016 #8 tufanv said: Thanks that fixes Click to expand... And this is most probably the correct way. The Code from @lemonisdead will work too i guess (due to the delegating the ui changes with cllsubdelayed to the mainthread). Upvote 0
tufanv said: Thanks that fixes Click to expand... And this is most probably the correct way. The Code from @lemonisdead will work too i guess (due to the delegating the ui changes with cllsubdelayed to the mainthread).
tufanv Expert Licensed User Longtime User Mar 9, 2016 #9 DonManfred said: And this is most probably the correct way. The Code from @lemonisdead will work too i guess (due to the delegating the ui changes with cllsubdelayed to the mainthread). Click to expand... So let me ask you another question , what is the best possible way to get the lines i wanted. For example i want to get the value of 2.9201 (just below the line : <td class="para">ABD DOLARI</td> should i use the txtkod.text.contains and something like indexof to get it or is there a better way ? It is a bit off topic from the question but sorry Upvote 0
DonManfred said: And this is most probably the correct way. The Code from @lemonisdead will work too i guess (due to the delegating the ui changes with cllsubdelayed to the mainthread). Click to expand... So let me ask you another question , what is the best possible way to get the lines i wanted. For example i want to get the value of 2.9201 (just below the line : <td class="para">ABD DOLARI</td> should i use the txtkod.text.contains and something like indexof to get it or is there a better way ? It is a bit off topic from the question but sorry
DonManfred Expert Licensed User Longtime User Mar 9, 2016 #10 - You can use XOM and iterate through the code with it - You can use regex to find the right code snippet) Upvote 0
- You can use XOM and iterate through the code with it - You can use regex to find the right code snippet)
I inakigarm Well-Known Member Licensed User Longtime User Mar 9, 2016 #12 For parsing Html I often use jsoup library: https://www.b4x.com/android/forum/threads/jsoup-html-parser.49152/#post-309185; with this library, you can get HTML elements directly Upvote 0
For parsing Html I often use jsoup library: https://www.b4x.com/android/forum/threads/jsoup-html-parser.49152/#post-309185; with this library, you can get HTML elements directly