J jscoulter Member Licensed User Longtime User Mar 8, 2011 #1 HI All. I have not tried this, but thought I would ask the question first so I dont waste too much time Say I use a Webview in my app. This then loads a webpage of some static data from a server somewhere. The page will have a table layout, and part of the displayed data has a hyper link the user can click on. When the user clicks on the URL, is it possible to NOT have the WebView control go to the URL location? I am thinking of having a custom URL that my app. traps and then does something with it instead of going to a webpage. Thanks, Jeremy
HI All. I have not tried this, but thought I would ask the question first so I dont waste too much time Say I use a Webview in my app. This then loads a webpage of some static data from a server somewhere. The page will have a table layout, and part of the displayed data has a hyper link the user can click on. When the user clicks on the URL, is it possible to NOT have the WebView control go to the URL location? I am thinking of having a custom URL that my app. traps and then does something with it instead of going to a webpage. Thanks, Jeremy
Erel B4X founder Staff member Licensed User Longtime User Mar 9, 2011 #2 This is not possible. However you can download the server page with the HTTP library and then edit the text and replace the links with your own links. The modified string can be displayed in the WebView with WebView.LoadHtml. Upvote 0
This is not possible. However you can download the server page with the HTTP library and then edit the text and replace the links with your own links. The modified string can be displayed in the WebView with WebView.LoadHtml.
J jscoulter Member Licensed User Longtime User Mar 9, 2011 #3 Well I was going to use the URL to hold an ID and then when the click on the URL and use that to tell the app. to show something based on the ID in the URL. In Win32 when you use the IE control there is a "BeforeNavigate" event which is what I use.....but I didnt expect that in Android, I was just seeing if there was something similar or not....the answer is not but thats ok. Jeremy Upvote 0
Well I was going to use the URL to hold an ID and then when the click on the URL and use that to tell the app. to show something based on the ID in the URL. In Win32 when you use the IE control there is a "BeforeNavigate" event which is what I use.....but I didnt expect that in Android, I was just seeing if there was something similar or not....the answer is not but thats ok. Jeremy
peacemaker Expert Licensed User Longtime User Mar 9, 2011 #4 Note that there are redirects and a cookie saving requirements from some servers, that HTML page would be properly downloaded, as if downloaded/shown by a browser. Upvote 0
Note that there are redirects and a cookie saving requirements from some servers, that HTML page would be properly downloaded, as if downloaded/shown by a browser.