B4A Library WebViewExtras

Discussion in 'Additional libraries, classes and official updates' started by warwound, Nov 7, 2011.

  1. Srikanth.pendru

    Srikanth.pendru New Member Licensed User

    Dim WebChromeClient1 As DefaultWebChromeClient
    by adding this to webview the page rendered correctly

    Thank you Derek Johnson :)
  2. Srikanth.pendru

    Srikanth.pendru New Member Licensed User

    Thank you
  3. Neojoy

    Neojoy Member Licensed User

    Hi, is there some way to get button click event by id tag?
  4. DonManfred

    DonManfred Expert Licensed User

    1. You should always create a new thread instead of posting to old threads.
    2. You can add a javascript interface and inject javascript and add resposible javascript code to the page to communicate with your app.
  5. Neojoy

    Neojoy Member Licensed User

    My apologies!

    Ok, so I got to change my page to talk with my app.

    Is there some exemple?

  6. DonManfred

    DonManfred Expert Licensed User

    Dont expect me to do the forumsearch for you. Search for javascript interface
  7. Neojoy

    Neojoy Member Licensed User

    I dont asked for this, i would like to know if you knew some exemple.
    Yes or not would be enough!

    Thanks, I solved.

    Have a nice day!
  8. JohnC

    JohnC Well-Known Member Licensed User

    Just a suggestion....I think it would be very helpful to include the newer webviewsextras2 lib download and reference documentation links in the first post of this thread because doing a search for "Webviewextras2" did not return a "Library" thread for v2. It did return a download link thread for v2 that first had a broken link, then a good link. But I could not figure out who wrote or was supporting the never version 2 because the first post of this thread only mentioned v1. And because I have become use to library threads on this forum to at least have a link to a more recent version of a lib in the first post of an older lib, it gave me the impression v2 was written by someone else and I had no idea who.

    It wasn't until I happen to accidently stumbled upon the above post which let me know that warwound did write version 2 and that documentation exists for the lib (wouldn't it also be helpful to have the link for the reference documentation of this lib to be on the first post too?)

    Just sayin' :)
    Last edited: Mar 2, 2019
  9. JohnC

    JohnC Well-Known Member Licensed User

    Hi Warwound,

    As you can see in this thread:


    Erel came up with a way to intercept the "Browse" button on a webpage (https://www.b4x.com/android/forum/threads/upload-files-with-webview.98623/) which allows us b4a developers to now do various things before uploading a file, and it has the benefit of not having to make any changes or add a webpage to the website in order to upload a file - it is compatible with the standard "browse" button on webpages.

    But because his method is incompatible with your WVE lib and because my app uses various features of WVE, Erel being the very helpful guy that he is, is trying to help me manually implement the needed WVE features one-by-one into his implementation of the chromeclient. But this can become time consuming if I need more features from WVE and seems like it's reinventing the wheel you already wrote.

    So, I was wondering what the chances were for you to implement Erel's browse/file upload ability into your lib to solve this situation.

    Any thoughts?
  10. Highwinder

    Highwinder Active Member Licensed User

    When I try to use this library to clear the webview cache, my app crashes. It also crashes when I use the following code without using the library:

    Dim o As Reflector
    o.Target = WebView1

    Any ideas?
  11. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Hello my friend,

    Is possible to get all elements of page from WebE?

    mDocument = WebE.GetDocument

    and how I can submit a click on a button of a page? in your example ?
  12. LordZenzo

    LordZenzo Well-Known Member Licensed User

    Hello everyone
    I'm creating a simple app
    I need to login
    I use "WebExtra.PostUrl (" https://www.robedacartoon.it/login "," email=giannini.lorenzo.98@gmail.com&passwd=xxxpassword ".GetBytes (" UTF8 "))"
    the email used as userName is entered in the field, the password no! I checked the INPUT field names and they are right
    a suggestion?
  13. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

  14. LordZenzo

    LordZenzo Well-Known Member Licensed User

  15. Lello1964

    Lello1964 Active Member Licensed User

    i'm tryning to open xml file with xls scheme using WebViewExtras lib,
    whius is my code :
    Sub Globals
    Dim WebView1 As WebView
    Dim WebViewExtras1 As WebViewExtras
    Dim WebViewSetting As WebViewSettings
    Dim DBFileDir As String                   : DBFileDir =RP1.GetSafeDirDefaultExternal(""
    End Sub

    Sub Activity_Create(FirstTime As Boolean)
    Activity.AddView(WebView1, 00100%x100%y)
    Dim url="file:///" & File.Combine(DBFileDir, "IT00430310672_0001N.xml")
    Log("Loading " & url)
    End Sub

    file xls and xlm are ... /Android/data/xmkl.test/files/

    i have this error :

    Logger connesso a:  Xiaomi Redmi Note 
    --------- beginning of system
    --------- beginning of main
    Service (starter) Start **
    Activity (main) Create, isFirst = true **
    Unsafe attempt 
    to load URL file:///storage/emulated/0/Android/data/xmkl.test/files/fatturapa_v1.2.xsl from frame with URL file:///storage/emulated/0/Android/data/xmkl.test/files/IT00430310672_0001N.xml. 'file:' URLs are treated as unique security origins.
     in file:///storage/emulated/0/Android/data/xmkl.test/files/IT00430310672_0001N.xml (Line: 2)
    Activity (main) Resume **

    how can i solve ?
  16. Devv

    Devv Active Member Licensed User


    i am using webview extras 1.42
    we used these funtions in our app
    we need to use also flingable webview

    we need LongPress (X As Float, Y As Float)

    can we use the two libraries together ?
  17. DonManfred

    DonManfred Expert Licensed User

    1. ALWAYS create a new thread in the questionsforum for any issue you have. Posting to existing threads is a mistake.
    2. Did you tried it and you got any error? 'Which one?
    Myr0n likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice