Larry4963687
Posts: 0
Joined: Tue Sep 04, 2012 7:04 pm

How to put a webview on a mobile page.

I would like to put a webview on a page with the builder. It would be on a tab container with some footer buttons. How do I do this with the builder?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to put a webview on a mobile page.

In Tiggzi, you always start with a web view, as you start with HTML mobile app. If you need to embed another site, you can do this:

1) You can insert an iframe, similar to the YouTube example: http://help.tiggzi.com/documentation/...

2) Use a PhoneGap ChildBrowser plug-in:
code
var childBrowser = ChildBrowser.install();
window.plugins.childBrowser.showWebPage('http://google.com');
/code

Larry4963687
Posts: 0
Joined: Tue Sep 04, 2012 7:04 pm

How to put a webview on a mobile page.

Can you give some more detailed examples on how to use the child browser. I tried putting option number 2. into the load of the screen with no results.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to put a webview on a mobile page.

Do it on click event.

Larry4963687
Posts: 0
Joined: Tue Sep 04, 2012 7:04 pm

How to put a webview on a mobile page.

I dropped a button on the screen added the click event - push the button. Nothing happens. What I'm I missing. Can I share the app with you?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to put a webview on a mobile page.

How do you test the app? You have to run it as a hybrid app.

Larry4963687
Posts: 0
Joined: Tue Sep 04, 2012 7:04 pm

How to put a webview on a mobile page.

The project type is set to mobile app and I also tried it on my iPhone by scanning the QR code.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to put a webview on a mobile page.

When you scan the QR code you run the app in the browser. If you want to use the ChildBrowser plug-in, it has to be a hybrid (native) app, installed on the phone.

Larry4963687
Posts: 0
Joined: Tue Sep 04, 2012 7:04 pm

How to put a webview on a mobile page.

Ok I've put a button on the mainscreen1 and the on click event I added the var childBrowser = ChildBrowser.install();
window.plugins.chidBrowser.showWebPage('http://google.com');
I compile and load on the iPhone click on the button and nothing happens. What I'm I missing? The app is shared and called xapp.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to put a webview on a mobile page.

Try:

cb = window.plugins.childBrowser;
cb.showWebPage("http://google.com");

as per: https://github.com/purplecabbage/phon...

Return to “Issues”