Stencyl 3.4.0 is now out. Get it now!

[iOS/Android] WebViews 2.0 (in-app browser) v2.4.2

robinschaafsma

  • *
  • Posts: 646
Webviews 2.0 for iOS and Android (in-app browser)
Works on iOS, Android

Because the extension of  Abliblablobla is not working with the latest build of Stencyl (3.3) and the project can not be rebuilt because it is not complete.
I find a new WebView extension that i have rebuild so it will work with Stencyl.
Source: https://github.com/fbricker/openfl-webview

This  extension works on Stencyl 3.4 and above
Because its a different extension, i open a new topic, to explain how this extension works.

IMPORTANT
This Extension Required the Toolset Extension Manager http://byrobin.nl/store/product/byrobintoolsetextension/


Features
- Full-screen and Popup mode.
- Popup mode has a close button on the top-left corner
- Whitelist validation (the webview will close if the user goes to a non-whitelisted URL).
- Blacklist validation (the webview will close if the user goes to a blacklisted URL).
- 64-bit support to iOS
- Tested with iPhone 5 IOS 8, Ipad IOS 8 and Samgsung Note 3 4.4.2
- Open webview with HTML code.

How to download this extension
Go to: http://byrobin.nl/store/product/webview2-0-for-ios-andrid-stencylopenfl
Add the extension to the cart en proceed with checkout. After you successfully placed the order, you will get an e-mail with the download link or go to “My Account” section where you can also find the download link.

Install the zip file: Go to : http://community.stencyl.com/index.php/topic,30432.0.html

How to install this extension
Go to: https://github.com/byrobingames/webview2.0/blob/master/README.md#how-to-install

Documentation
Or See: https://github.com/byrobingames/webview2.0/blob/master/README.md#documentation-and-blocks-example

Just put the block under a  button, fill in the block and the webview will open.

----------------------------------------------

Open WebView
Open webview in a popup or in fullscreen.



Inputs
- website url(as Text) start with http://
- popup or fullscreen(as choise) (no close with fullscreen)
- Whitelist (as Code(array))
- Blacklist (as Code(array))

Example 1: Without whitelist and blacklist


-url = http://www.google.com
-popup
-whitelist= null
-blacklist= null

Example 2: With whitelist


-url = https://github.com
-popup
-whitelist = [“(http|https)://(.*)github.com(.*)”]
-blacklist = null

This means that the user can browse only on github.com, if they enter another url, the webview will close.

Example 3: With blacklist


-url = http://www.google.com
-popup
-whitelist = null
-blacklist = [“(http|https)://(.*)github.com(.*)”]

This means the user can browse on every website, exept on github.com, if the user browse to github.com, the webview will close.

How to add more website toe whitelist and blacklist.
Because the whitelist and blacklist is a array, you can add more website to these lists.
Just before the close Bracket “]”, you putt ,”http://website.com” (comma-Quotation mark-url-Quotation mark)
Like this: [“(http|https)://(.*)github.com(.*)”,”http://website.com”]

Legend for whitelist and blacklist
[ ] = between open close brackets, you put code.
" " = between the 2 Quotation mark you put the website you wanna add to the list.
, = between more websites you enter a comma.
(http|https) = looks if the website is http or https
(.*) = can be everything,  if  the website have submaps.
----------------------------------------------

Version History
- 2.0 second new release
- 2.1 Enabled Javascript for Android (IOS enabled by default)
- 2.2 Update info.txt file.
- 2.3 Add icon on block, download now from GitHub
2017-03-21(2.4) Added Android Gradle Support for openfl4 and added open webview with HTML Code block
2017-05-16(2.4.1) Tested for Stencyl 3.5, Required byRobin Toolset Extension Manager
2017-05-18(2.4.2) FIX: Single/Double quotes not accepted inside the Toolset


If you have any suggestions of questions, just let me know.

Enjoy this extension..

« Last Edit: May 18, 2017, 01:56:45 am by robinschaafsma »
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl



Jon

  • *
  • Posts: 17515
Thanks! I've swapped in this one into the Extensions Market.

Stevetheipad

  • Posts: 1304
You're awesome man - keep making extensions! I've donated a little to show my support.

How about some more customization options? Here's what I have in mind:

1) Drop down of the redirect mode - 1 option for close browser when a restricted site is visited, 1 for a redirect to a specific page and 1 for it to go back a page to the page you were on before visiting the prohibited one)

2) Look and color

Razvan3486

  • Posts: 27
This extension don't work in 3.3 version, can you update for 3.3 ?

robinschaafsma

  • *
  • Posts: 646
This extension don't work in 3.3 version, can you update for 3.3 ?

Extension works fine in 3.3, it is special build for it.

Try the following:
- delete extension manual
- reinstall extension
- run clean project
- build

If you still get a error, post the error logs, behavior that you use. IOS or Android? etc. etc. Only than i can figure it out what the problem is.

I have tested many times on 3.3, and it works fine for me on IOS and Android.

byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl



robinschaafsma

  • *
  • Posts: 646
Update
- Webview 2.1 (11-05-2015): Enabled Javascript for Android. (On IOS enabled by default)
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl



captaincomic

  • *
  • Posts: 6109
Someone had a problem with this extension when compiling for Windows. If you set the compatibility in the info.txt to
Code: [Select]
compatibility=mobileit should prevent it from being included on other platforms. 

robinschaafsma

  • *
  • Posts: 646
Someone had a problem with this extension when compiling for Windows. If you set the compatibility in the info.txt to
Code: [Select]
compatibility=mobileit should prevent it from being included on other platforms. 

I refuse to do this, because compatibility is already set to
Code: [Select]
compatibility=iOS and Android
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl



captaincomic

  • *
  • Posts: 6109
Yes, I noticed, but these are the only supported values:
all, flash, desktop, mobile, ios, android

It's possible that this wasn't (and still isn't) documented anywhere.

ETHproductions

  • *
  • Posts: 405
It's possible that this wasn't (and still isn't) documented anywhere.

Now it is. :)

I think it might be a good idea to update the Stencylpedia articles to include documentation on the different extension features. If you'd like, I could do this myself.
Fontstruct - Stencyl - Website (in progress)

Proud Member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

robinschaafsma

  • *
  • Posts: 646
Oh Ok, didn't know that :D,

Thanks ETHproductions for documentation.

I will update al my extensions with the right info file  :D

*EDIT* all updated now.

« Last Edit: June 13, 2015, 07:28:45 am by robinschaafsma »
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl



1MrPaul1

  • *
  • Posts: 1224
It is not compiling.
Error - Can't find assets

robinschaafsma

  • *
  • Posts: 646
It is not compiling.
Error - Can't find assets

More info please, platform?? log files??

*Edit*
Tested on IOS and Android, no errors on my side, using latest private build.

« Last Edit: June 14, 2015, 12:52:49 am by robinschaafsma »
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl



1MrPaul1

  • *
  • Posts: 1224
I'm using 3.2 (3.3 is to buggy for my) on windows 7 x64
[nme.bat] Reading HXCPP config: C:\Users\Saidilnoza\.hxcpp_config.xml
[nme.bat] Error: Could not find asset path "D:\stencyl3\stencylworks\engine-extensions/webview2.0/assets/"

robinschaafsma

  • *
  • Posts: 646
I'm using 3.2 (3.3 is to buggy for my) on windows 7 x64
[nme.bat] Reading HXCPP config: C:\Users\Saidilnoza\.hxcpp_config.xml
[nme.bat] Error: Could not find asset path "D:\stencyl3\stencylworks\engine-extensions/webview2.0/assets/"

This extension does not work with 3.2,
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl