B4A Library WebViewExtras

Intiwhiz

Member
Licensed User
@warwound , I have web application, and for access via android use webextra library and webview, but if I use filedialog from webview, there's no choice from camera phone.

If my web application, open from browser on android, there's choice fileupload from camera.

Have solution for this case ?

thanks
 

ekologi

New Member
Licensed User
Longtime User
Dear All, masters,
I was been enabled using camera input in a html page using browser BUT not success using webview, requirement was to enable user to take picture and upload. Using WebViewExtras only give me access to upload file from gallery. Is there any way to accessing camera within webview?
Thanks in Advanced
 

Intiwhiz

Member
Licensed User
yes, i have same problem, the choice from camera didn't shown. If I use browser from android it can be shown
 

Attachments

  • WhatsApp Image 2016-10-15 at 12.15.31 PM.jpeg
    66.7 KB · Views: 272

Mashiane

Expert
Licensed User
Longtime User
This is so powerful thanks a million...
 

Leni Berry

Active Member
Licensed User
Longtime User

Dear warwound,
where is the library WebViewExtras2 version 2.41? i cant find the link...
 

warwound

Expert
Licensed User
Longtime User
Dear warwound,
where is the library WebViewExtras2 version 2.41? i cant find the link...

WebViewExtras (original version) was updated to version 2.41 and can be downloaded from first post in this thread.

WebViewExtras2 latest version is 2.20 and available from here.

There is no WebViewExtras2 version 2.41.
 

eps

Expert
Licensed User
Longtime User
I've been using the excellent WebViewExtras2 library to great effect, thanks for providing this.

I've come across an issue - although to be honest it might not be solveable or be worth spending a lot of time on..

I have been using a current Android device (HTC 10) to work with babylonjs which uses webgl to display 3D graphics in HTML5..

This works as expected.

My current device has developed a problem - it's going to HTC to be fixed. I've resurrected an old device of mine and wanted to continue developing - or rather confirming that the HTML5 'app' works as expected on a smartphone.. e.g. an HTC Evo 3D (running... Android 4.0.3). Now this does seem to have some webgl capabilities, which I've confirmed using html5test.com.. but if I go to that website using a ChromeClient via WebViewExtras2 it doesn't have webgl enabled or permitted - which is really frustrating! I was just wondering if there was any way of attempting to expand the webgl capabilities of WebViewExtras2 or if anyone had an inkling as to why it works on the HTC 10 but not on the Evo 3D. Of course I could just be pushing the realms too far - but when I used a CustomChromeTab this had webgl enabled on the Evo 3D - so something in the library seems to be setting webgl to disabled... admittedly 4.0.3 is pushing it. But then in the CustomChromeTab I can't load a local html file... which is what I've been doing in WebViewExtras2.

Anyone able to shed any light on this please? or shall I just wait until the newer phone is returned?
 

An Schi

Well-Known Member
Licensed User
I don't know if that helps or is connected to your problem...
In one of the android 4.x versions (4.1 or 4.4?) the webview was improoved and features were added. Take a look at the android documentation for more detailed infos.
 

smallqiang

New Member
Licensed User
WebViewExtras (original version) was updated to version 2.41 and can be downloaded from first post in this thread.

WebViewExtras2 latest version is 2.20 and available from here.

There is no WebViewExtras2 version 2.41.

Hello warwound, thank you very much for writing webviewextras2, the best b4a WebView extension. In using of this lib, I found below the SDK 23 , onReceivedError is contain a bug, there is no way to obtain 404 error. In order to solve this problem, Google added a onReceivedHttpError event to solve the problem in SDK23. Can you update the trouble of libraries, making it more perfect? Thank you for sharing
 

An Schi

Well-Known Member
Licensed User
I wanted to use the _PageStarted Sub from the DefaultWebViewClient. But the app allways crashed, when i clicked on a link with the error:
java.lang.Exception: Sub def_pagestarted signature does not match expected signature.

Erel suggested to replace

B4X:
Sub Def_PageStarted(Url As String, FavIcon As Bitmap)
    Log("PageStarted URL = " & Url)
End Sub

with

B4X:
Sub Def_PageStarted(Url As String, FavIconO As Object)
    Dim FacIcon As Bitmap = FavIconO
End Sub

Now the app doesn't crash anymore.

Here you can see the whole thread: https://b4x.com/android/forum/threads/solved-pagestarted-signature-error.83126/#post-526484
 

Shay

Well-Known Member
Licensed User
Longtime User
I am trying to autoplay this radio station
on windows it will autoplay, but in webview it is not
I am trying:

B4X:
station="http://glz.co.il/%D7%92%D7%9C%D7%92%D7%9C%D7%A6"
MyWebViewExtras.JavaScriptEnabled = True
MyWebViewExtras.LoadUrl(station)
... after page is loaded
MyWebViewExtras.executeJavascript("javascript:void(0);")

it is not helping
(using WebViewExtra2 2.2)

also tried without luck:
MyWebViewExtras.executeJavascript("void(0);")
 
Last edited:

Shay

Well-Known Member
Licensed User
Longtime User
On the web page, the button to start the live streaming is only sending this void command
this is the button element:
 

Attachments

  • upload_2017-9-2_18-27-7.png
    297.5 KB · Views: 193

Leni Berry

Active Member
Licensed User
Longtime User
How to Get the source code of a webpage with WebView and WebViewExtras2 not WebViewExtras?

Please Help
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…