CustomWebView : An extended form of Web Viewer

Thanks that worked, but now ads are not blocked even after activating adblock, can i set specific urls i want to allow to be opened?

I'm using custom webviewer for my website app, but within my webpages there are buttons that link to another particular website, how do i allow the app to only open this one extra website

PageStarted event is raised whenever a new url is starting to be loaded so call StopLoading block at this moment if url doesn't matches with whatever you hope it to be.

1 Like

I'm looking but haven't found this, can you help with an example block please?

It's StopLoading actually.
image

Thanks for reply, it's still not working tho, now the initial website doesn't load at all, it only works when i add the original website as the url in the block, how can i add multiple urls to the block? I want to add both the original website and the other one as this might work

Quite easy.

Thanks alot for your help, i really appreciate...this fixed it

Hello, i need help pls anyone, I used these blocks to run downloads in my app but the downloaded filename is just the extension .mp4 how do i make it show the right name?

GuessFileName is the best way to get file name from url.
But if it does not work as expected then what you can do it to split url at / and select last item of the list.

Oh! No Url doesn't have file name :cry:

Then in that case, since you have file extension (mp4) so you can make a random file name and suffix file extension to it.

I don't know how to go about this tho, i don't understand yet, but about extracting name from the url, is it from the final download url?

httpss://storage-31.dsto.store/46e4084471cadb48f887a17/EP.1.v0.1699238407.360p.mp4?token=DVRBOxMmOI684h5GNNMCzw&expires=1699255181&id=394049&title=

I added an extra s because mp4 file was embeded here

This is the direct download link of an mp4 and the title starts from EP.1.VO, can the name be collected from this section ?

Hello, thank you all for creating this incredible community. I have a question which is How to solve the below issue:

Runtime Error

Argument #2 (com.google.appinventor.components.runtime.Table...) to 'com.sunny.CustomWebView.CustomWebView.CreateWebView(com.google.appinventor.components.runtime.HVArrangement,int)' has wrong type (com.google.appinventor.components.runtime.TableArrangement) (expected: com.google.appinventor.components.runtime.HVArrangement)
Note: You will not see another error reported for 5 seconds

Most probanly you try to create webview using as container a table arrangement instead of a Vertical Arrangement

WebviewHArrangement - accepts horizontal arrangement
WebviewVArrangement - accepts vertical arrangement

image

2 Likes

Hi, I'm trying to download the contents of the web portal I created (and now I wanted to create its app). I tried to download the payrol but despite or following the guides, if I click on the button nothing happens and the page zoom there is no way to remove it. how can I do? I attach the blocks that I inserted following your examples

What happens when you pass Download as downloadDir ?

Nothing is happening. I press the button to download the file but nothing happens.

Post aia.

trai@gmail.com
abc123456

last icon left (document)
JSMARTED.aia (109.8 KB)