Asset - Extension GMSWebView Game Maker Studio Android Extension

RizbIT

Member


GMSWebView - Game Maker Studio Android Extension

** NOW WORKS WITH GMS 2 ***

Get more information, links, updates and purchase it here:
http://www.rizbit.uk/gmswebview/

This is the first and ONLY original webview extension for #Android!

Buy it on YoyoGames MarketPlace Today with 33% off sale price​

This extension allows you to embed a working real webview object directly onto the game/app screen on your Android games/apps . You may also call it a Web Browser object, Browser control or TinyWeb.

Alot of time has gone into making this extension and it has been tested on a few Android devices; the price reflects this. You will find many uses of #GMSWebView extension, several useful usages are shown in the demo app, for example show a YouTube video or embed a HTML5 game or widget!

- Show Youtube Videos In Your Games (Like Intros and cut scenes)
- Embed HTML widgets (SoundCloud, Stat Counters, Analytics & loads more)
- Embed Javascript Objects
- Play online music
- Embed HTML5 games
- Display CPA/CPI Banners
- Monetize Apps
- Cross Promotion
- Many more uses!




You will need the Android export module.

Copyright RizbIT UK 2019.
 
Last edited:
M

Mann_mit_Hut

Guest
Wow.. that's pretty cool!
Is it possible to display google maps for example?
 

RizbIT

Member
Oh yeah fantastic idea!

Yes you can definitely use Google Maps to for example show you business location or any location, just use
https://maps.google.com

Then using their HTML API you can add PINS, locations etc...

But dont forget you can use Javascript based API too, so create the map feature using Javascript in a HTML file, either host or include that file then set the GMSWebView URL to that site (not 100% sure if this would work if you included the html file in the app but you can try)

Thanks Nocturne I pulled a lot of hairs out trying to get this work and also had to spend a bit to get a little help from a more experience professional coder.
 

RizbIT

Member
This looks like a great extension, and the sale is too good an offer to miss... take my money!
For that means..it must be good!

Anyway i just added the uploaded Extension to a new app i was working on, only to find it let add the resources i wanted to but after that the actual Extension functions were not added!

Why is this.

When making the new version i right clicked the extension and selected "Create Asset Package", on next dialog box i selected the correct extension created on the marketplace GMSWebView.

then pressed next.

Am i submitting an extension without the extension functions?
 

RizbIT

Member
Wow this just sucks big time.

Spent ages making an extension - first of its kind and something I thought would sell well and well 1 sale.

And the support is awful. Ive had problem trying to package up android extension in a way it actually works and no reply on forum or support ticket, and on the support tickets they say if you want faster response try the forum?
 
S

Sam (Deleted User)

Guest
I dont have iphone or Mac or the iphone export module.

Are ios extensions also Java based?
No. I know for a fact that for iOS it is not Java. I believe it is Objective-C. But iOS has a built-in WebView control of its own as well, so if and when you get the devices, once you learn how to program for iOS, it shouldn't be too difficult to port. This extension looks nice, I'm almost tempted to make an extension like it, but make it free and open source. For more info on Apple's WebView iOS implimentation have a look here: https://developer.apple.com/reference/uikit/uiwebview
 
Last edited by a moderator:

RizbIT

Member
make a free one on android...um so you want to put me out of business before i even started...um

It was really hard work for me to get this made, why i should i give it away for free.

export modules cost like $199 so users who are serious are willing to pay to use these extras and extensions.
 

rIKmAN

Member
make a free one on android...um so you want to put me out of business before i even started...um

It was really hard work for me to get this made, why i should i give it away for free.

export modules cost like $199 so users who are serious are willing to pay to use these extras and extensions.
It's not really a business if you've only had 1 sale, not meant to sound harsh but it's true.

Also it sounds like you missed the Humble Bundle sale a couple of weeks ago where GM:S and all export modules were available for $15.

I would buy this if it supported iOS as well, but if it only supports one of the mobile targets for me personally it's not worth it as it would mean drastic differences between Android / iOS versions of any game that used this extension.

Got this thread watched though in case you update it in the future - and good work, looks great in the video on the Marketplace.
 

RizbIT

Member
It's not really a business if you've only had 1 sale, not meant to sound harsh but it's true.

Also it sounds like you missed the Humble Bundle sale a couple of weeks ago where GM:S and all export modules were available for $15.

I would buy this if it supported iOS as well, but if it only supports one of the mobile targets for me personally it's not worth it as it would mean drastic differences between Android / iOS versions of any game that used this extension.

Got this thread watched though in case you update it in the future - and good work, looks great in the video on the Marketplace.
no its not your fault I just thought it was something people have been wanting I know I had been looking for this feature for ages.

$15 wow...if i could buy iphone export module for $15 maybe then i could buy a cheap second hand iphone and mac
 

RizbIT

Member
New version 1.3

Ive added two functions to control the scrolling and scrollbars. These should be called BEFORE you create the WebView Control. But you can set the scrollbars on/off while it is created.

WebView_SetScrolling(enabled);
WebView_SetScrollBars(enabled);
 

RizbIT

Member
Positioning the webview can be a bit tricky unless you know what youre doing.

I found this to work:
Code:
Positioning the webview can be a bit tricky unless you know what youre doing.

I found this to work:
xfactor=floor(display_get_width()/320);
yfactor=display_get_height()/480;

var a = application_get_position();
xx = a[0]; yy = a[1];
WebView_SetScrollBars(0);
WebView_SetScrolling(0);

WebView_Create("https://Facebook.com/RizbIT",300*xfactor,400*xfactor,a[0]+(display_get_width()-(300*xfactor))/2,a[1]+(90*yfactor));

//xfactor is ued to rescale the size of the webview depending on the size of the display.  Assuming youre using views aswell.
//a[0] and a[1] are used to position the webview on screens that have been centred on a mobile display when its scaled with keeping aspect ratio (you know when you see black around the game screen)

//a[0]+(display_get_width()-(300*xfactor))/2   
//this sets the webview to the centre of the display
 

RizbIT

Member
I htink I sent a support ticket and forum thread about not being able to fully create the asset package, so the downloaded extension did not work.

With new version 1.4 ive published and actually downloaded the extension from the marketplace to a new android project. The compiled apk confirms the extension works as intended.

Please report any bugs or suggestions here.

Thanks
 

RizbIT

Member
I have been asked about screen size issues with GMSWebview Extension.

As there are various factors involved such as Views, Ports, Screen Size, Room Size, DPI etc... You have to experiment to see what works best. You cant just rely on screen size.

In the example app I use the following code to set the Webview to Fullscreen:
Code:
WebView_Create("http://rizbit.uk",display_get_width(),display_get_height(),0,0)
This code was used to create an Ad Banner style webview at the top of screen:
Code:
var xfactor=floor(display_get_width()/320);
var yfactor=display_get_height()/480;

var a = application_get_position();
xx = a[0]; yy = a[1];
WebView_SetScrollBars(0);
WebView_SetScrolling(0);

WebView_Create(global.tempurl,320*xfactor,50*xfactor,a[0]+(display_get_width()-(320*xfactor))/2,0);
 
M

Mann_mit_Hut

Guest
Don't be sad about it not selling so well, because you have to think about the fact that it is a very specific addin.

A game usuallly doesn't need it for living, and some advanced features that are enabled by this addin, need serious skill by the game developer - he has to make an additional website, webserver, content and so on. I think most developers try to get around that because its just so much work.

Anyway, i like the idea to be able to do so with your addin, especially for google maps, but i have to admit that i don't have a use-case at the moment ;) just stay tuned!
 

RizbIT

Member
Well Ive sold a few now, so not a total waste of time..

Will these extension (I hope) work on GMS v2?
 
T

Temanibble

Guest
Hello Sir, the current GMS WebView does not offer the back/forward functionality. Can you integrate it within the current version? We are really looking to make use of these two functionalities to switch and enable more user interaction with the device.

Thank you
 
T

Temanibble

Guest
Is it also possible to request the webview sample/demo app? I can provide you with proof of purchase of the extension.

Looking forward to it, this is a very very promising and awesome extension!!!! Keep up the great work!

Best regards,
Temanibble
 

RizbIT

Member
I have integrated the back/forward navigation features into the webview but as it stands may not work on all devices, including one i tested on. I would have to look at the Java code again to see why they dont work as they should.

In the demo app you can see there are buttons for back and forward.

If you need this urgently you can simulate the back/forward features using GML code. You can create a list of URL's visited by the webview (using the WebView_GetURL()) function to retrieve the webview URL when its changed or via a check in the step event. When the url is different to the current url append it to the history list in GM. then you can navigate forward and backward using that list
 
T

Temanibble

Guest
The problem is that I'm trying to make use of game maker objects to interact on top of the webview, just like shown in the trailer you posted. I want to have the capability of controlling the webview and "disabling" it while still in view but behind another object. So the ideal scenario would be that I would have the webview load and then go behind one level behind, making whatever object was behind it appear in front. This is extremely beneficial as it would help me control not just the player, but also the room, this also allows me to add more touch screen controls if desired.

If you could please help with fixing this!

Thank you!
 
T

Temanibble

Guest
Wow this just sucks big time.

Spent ages making an extension - first of its kind and something I thought would sell well and well 1 sale.

And the support is awful. Ive had problem trying to package up android extension in a way it actually works and no reply on forum or support ticket, and on the support tickets they say if you want faster response try the forum?
I disagree. This is a very powerful extension, there are of course some missing things that will definitely expand the functionality of this extension, however this is quite powerful in itself. I disagree with what some have said "make it go free", then you end up losing all your money. I mean I purchased it myself and was WELL WORTH the money, but I would definitely recommend decreasing the price until you have several more sales (10+) then increasing it. The primary focus should be rating and customer interaction with the app, during the initial stages of these extensions and really of any selling business you want to have a lot of input from others and rating, as that will increase the popularity. Once that is set, you will have developed a great customer relationship and others will see the ratings and the trust worthiness that it has developed, and will be willing to spend more money on it without a doubt.

I would also suggest, if you have the opportunity, to also get with other developers and work with them, in turn, they can promote your ideas through their apps and customer ratings. Definitely a suggestion :)
 

RizbIT

Member
I disagree. This is a very powerful extension, there are of course some missing things that will definitely expand the functionality of this extension, however this is quite powerful in itself. I disagree with what some have said "make it go free", then you end up losing all your money. I mean I purchased it myself and was WELL WORTH the money, but I would definitely recommend decreasing the price until you have several more sales (10+) then increasing it. The primary focus should be rating and customer interaction with the app, during the initial stages of these extensions and really of any selling business you want to have a lot of input from others and rating, as that will increase the popularity. Once that is set, you will have developed a great customer relationship and others will see the ratings and the trust worthiness that it has developed, and will be willing to spend more money on it without a doubt.

I would also suggest, if you have the opportunity, to also get with other developers and work with them, in turn, they can promote your ideas through their apps and customer ratings. Definitely a suggestion :)
thanks for the feedback.

i will take it on board.

I will be making a black friday weekend sale for 3 days if people are interested.
 

RizbIT

Member
The problem is that I'm trying to make use of game maker objects to interact on top of the webview, just like shown in the trailer you posted. I want to have the capability of controlling the webview and "disabling" it while still in view but behind another object. So the ideal scenario would be that I would have the webview load and then go behind one level behind, making whatever object was behind it appear in front. This is extremely beneficial as it would help me control not just the player, but also the room, this also allows me to add more touch screen controls if desired.

If you could please help with fixing this!

Thank you!

The webview is embedded ontop of the game screen, even when you change rooms its still there on the top unless you hide or destroy it.

To make other objects go on top would mean fiddling with GM code but i dont know about GMS compiled code or structure nor do i think i should. objects are created on screen during runtime, then the webview is created. it is positioned very topmost, but how would i tell it to be positioned under a specific object, how does the java script get the id or handle of the object to place it under? These are questions id need answers for before attempting this.

If you look at other third party SDKs, for example for banner networks, their banner always stays on top of your game
 
T

Temanibble

Guest
What about making use of the depth field? But even then, you made use of the back and forward functionality in the video. That's really the only thing I need. As I saw on the video you were able to click the buttons that were in front of the webview, and when you then clicked "front" the webview took priority and it would cover the button press so you would not be able to press the button behind it.
 

RizbIT

Member
What about making use of the depth field? But even then, you made use of the back and forward functionality in the video. That's really the only thing I need. As I saw on the video you were able to click the buttons that were in front of the webview, and when you then clicked "front" the webview took priority and it would cover the button press so you would not be able to press the button behind it.
ive sent you an email did you get it?
 
M

MaxODidily

Guest
Right, so I decided to purchase this extension as it seems interesting and I like buying products from new enterprisers. To see how everything worked before having a mess about I decide to try out the test APK and well the continue button didn't work so I was stuck on the 1st room. I then decide to just import all assets from the extension into a new project and I compile it to Android and run from my phone (Moto X 2014 Android 6.0.1). And the continue button still didn't do anything. I swap the rooms around to see if any of them worked and none do. Most buttons on the last page fail to do anything if tapped and if I use "goto url" and enter a valid URL (the same one in your video) nothing happens. Either the extension is broken or I'm doing something wrong (probably the 2nd option). Any idea on what should I do? I love the idea of this extension but it is failing to work for me ;-;
(Also the continue buttons work on Windows(PC))
 

RizbIT

Member
Right, so I decided to purchase this extension as it seems interesting and I like buying products from new enterprisers. To see how everything worked before having a mess about I decide to try out the test APK and well the continue button didn't work so I was stuck on the 1st room. I then decide to just import all assets from the extension into a new project and I compile it to Android and run from my phone (Moto X 2014 Android 6.0.1). And the continue button still didn't do anything. I swap the rooms around to see if any of them worked and none do. Most buttons on the last page fail to do anything if tapped and if I use "goto url" and enter a valid URL (the same one in your video) nothing happens. Either the extension is broken or I'm doing something wrong (probably the 2nd option). Any idea on what should I do? I love the idea of this extension but it is failing to work for me ;-;
(Also the continue buttons work on Windows(PC))
please check your version is latest one v1.5

please make sure you have initialized the extension in the first object in first room (well any objects create event)

i just tested the apk and extension by compiling again to a sony xperia android phone.

Also is your phones OS upto date?

is your android sdk upto date?

are you saying the test apk does not work on your phone?

Are you able to ttest on a different android?

let me know if I can help you in any other way.
 

RizbIT

Member
please check your version is latest one v1.5

please make sure you have initialized the extension in the first object in first room (well any objects create event)

i just tested the apk and extension by compiling again to a sony xperia android phone and all features work. The continue button is just a simple object with a left pressed event that takes you to the next room.

Also is your phones OS upto date?

is your android sdk upto date?

are you saying the test apk does not work on your phone?

Are you able to test on a different android?

let me know if I can help you in any other way.
 

RizbIT

Member
People asking how to enable scrolling and scrollbars. You have to use the functions to set these after you initialize GMSWebview but BEFORE you create the Webview in your app.

Heres some code you can learn from:

Code:
var xfactor=floor(display_get_width()/320);
var yfactor=display_get_height()/480;

var a = application_get_position();
xx = a[0]; yy = a[1];
WebView_SetScrollBars(0);//scroll bars NOT shown
WebView_SetScrolling(1);//Scrolling ENABLED

WebView_Create("http://rizbit.uk",300*xfactor,247*xfactor,a[0]+(display_get_width()-(300*xfactor))/2,a[1]+(90*yfactor));
 
J

Jorge Hawkins

Guest
Can you retrieve information from the page, other than the title? Like console messages or things like that?
Also, can I use local files instead of webpages? (Like, open an HTML file instead of one hosted).
 

RizbIT

Member
we can retrieve the html content and few other things but it would need addition and modification to the existing code and updating the extension, a fair bit of work.

we have not had enought sales tbh to justify making updates yet.

if its something you really need for your app we can come to some custom arrangement please PM me

About local file can you set the destination uRl as something like "file://" thats references a local file. Ive not tried it
 

RizbIT

Member
In an Android application, files can be read from 3 types of locations:

  • Internal storage: Each app has its own, file names are relative to this location. URL takes form file:///myFolder/myFile.html

  • External storage: Needs permission and may not always be available. Get the root folder by calling Environment.getExternalStorageDirectory(). So, construct the URL using: String url = "file:///" + Environment.getExternalStorageDirectory().toString() + File.separator + "myFolder/myFile.html"

  • Assets: Stored in the apk. Read-only access. URL takes form file:///android_asset/myFolder/myFile.html
 
J

Jorge Hawkins

Guest
Oh yeah fantastic idea!

Yes you can definitely use Google Maps to for example show you business location or any location, just use
https://maps.google.com

Then using their HTML API you can add PINS, locations etc...

But dont forget you can use Javascript based API too, so create the map feature using Javascript in a HTML file, either host or include that file then set the GMSWebView URL to that site (not 100% sure if this would work if you included the html file in the app but you can try)

Thanks Nocturne I pulled a lot of hairs out trying to get this work and also had to spend a bit to get a little help from a more experience professional coder.
You cannot get the current user's location, though, because the prompt never appears in the first place.
 

RizbIT

Member
I see il check it out, maybe i need to enable notifications for the webview
or enable users to set it manually, then you could use a GM dialog to request permission before setting it
 
V

vensilver

Guest
hello i download your demo file apk .

after 5 sec i click the continue button.

but nothing happens.

how am i going to test the project before buying.
 

RizbIT

Member
Hi Vensilver thanks for your interest in GMSWebview.

The continue button has a simple room_goto_next() function in the left_pressed event of mouse.

I have just checked the app demo and when you click the continue button it should take you to the next screen. Each screen shows an example usage of the webview. If it doesnt work on your phone please try installing again or a different device.

Scan the QRCODE here:
GMSWebView - Game Maker Studio Android Extension - RizbIT - Apps, IT Services, Tech, Entertainment

You can also buy the Extension and see if you can get the project to work. if not you can apply for a refund.
 

RizbIT

Member
Aprils_Cool_Rizbit_640.jpg

Get over 50% off GMSWebview Throughout the whole of April 2017 !!

Its to celebrate the beginning of summer and the good times!

Just $9.99
 
Last edited:

RizbIT

Member
New version 1.7 out

Bug fix on WebView_Hide(1) on some screesn it wouldnt show the webview until it was moved ot you showed a dialog box.

New features:
Code:
WebView_IsCreated();// Returns 1 is webview created or 0 if it isnt, use before for example moving webview.
WebView_X();// returns a double value with X position of webview
WebView_Y();// returns a double value with Y position of webview
 
A

alexsaa

Guest
It does not work on the project, it needs something special.
or it will be that another extension intervenes, I only have the extensions of google play service, license and google iap
 
A

alexsaa

Guest
Exception thrown trying to call method WebView_Create on WebViewEmbed :/ HELP PLIS
 

RizbIT

Member
what issue are you having, are there any error messages?

i need more info
what version of gmswebview? (have you updated to latest one)
what version of game maker
what is the target sdk of the build?
 
A

alexsaa

Guest
build tools : 25.0.2
support lib : 25.1.0
target sdk 25
min: 11
compile: 25
********************************
the version is : v1.41772
********************************
name of the extension: 1508599644_GMSWebView

Version 2.2.0. Published October 21, 2017
 

RizbIT

Member
can you try with support lib 23.2.1
and using android sdk manager make sure you have support lib 23.2.1 installed
 
Top