When using webviewer and opening a html page after login i always get first the privacy policy popup window for cookies...
Is there a way to accept this window with JS? I always accept.
Isnt the DSGVO regulation in Germany only for webpages, not for apps?
You are loading a web page in a webviewer, so you get the cookies/privacy popup. If you are lucky, the native webviewer will store cookies and prevent it presenting again, if not, you may need to modify the webviewer with an extension to accept the setting when you accept.
Tim, which extension can do this?
webviewextra
customwebview
Ok, i will check.
Btw: Is the hover help text correct for the
Set Webviewer1.WebViewString
?
Shouldnt it be Specifies...
instead?
Maybe you need another test if the value is neither?
You also do not need the green block, the contains block returns true or false.
You should also confirm that the webviewstring change is coming back from the web page.
To show privacy policy you can use built in Notifier component and show policy in Message Dialogue.
You mean i need global value variable or is the internal value ok from webviewstringchange?
Can i only get one value from webviewstringchange? I want to read one string from 1st html and 2nd from other hmtl page.
No, my blocks are just an example.
You should set a marker for each webviewstring you want to return - e.g. wvs1:value, wvs2:value
or you could set a variable when you call the respective html file.
The customwebview extension i found is from 2023, do you guess it will still be updated for latest AI2 SDK's? The author sunny was also suspended in kodular community
Dont know how
Now i want to set a variable to a js-string and use it for an if-block.
AI has no return value block for that, does only the webviewstringchange event work?
Yes, use the webviewstringchange block.
I checked customwebview extension from @vknow360 for policy permission.
Which is the correct block to grant the privacy policy permission in AI2?
?
What permission are you trying to set for customwebview ?
I only want to prompt AI2 to click the green button of the window above to accept cookies and to disappear the window.
https://community.appinventor.mit.edu/uploads/default/original/3X/4/6/462688b1be6b6def4ff891aeee0fb4c5db4280d6.png
You want to inject some javascript into the page to click the button ?
See here: App Inventor Tutorials and Examples: Inject | Pura Vida Apps