[PhoneGap Build] ChildBrowser Plugin Support

  • 1
  • Announcement
  • Updated 8 years ago
Hey guys,

Our first plugin - the ChildBrowser - is now available on PhoneGap Build!

A full announcement is here:
https://build.phonegap.com/blog/child...

While documentation and usage are here:
https://build.phonegap.com/docs/plugins

Please let us know in the comments which plugins you'd like us to work on next.

Cheers,
Andrew
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
  • relieved

Posted 8 years ago

  • 1
Photo of Thomas Reinberger

Thomas Reinberger

  • 13 Posts
  • 0 Reply Likes
Hi Andrew,

great to see that the ChildBrowser plugin is available now. I just tried it, but I wonder if I can hide the UI elements such as the location bar, reload button . In the docs I read that the option showLocationBar ("Android only") makes the locationBar visible or invisible.

However, I cannot conclude from that whether on iOS the location bar is generally visible because it cannot be set to invisble or should be generally invisible.

I'd like to have a webview with just the "done" button and no other controls visible.

Regards
Thomas
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
With Android, you can either show the location bar (so it can be dismissed with touch controls) or hide it (so it is dismissed with the back button on the device).

Since iOS does not have a back button on the device, it cannot be used with the location bar hidden.

Having the controls on the location bar be configurable is a great idea - hopefully we can implement in a future release of the ChildBrowser. I've filed that as an issue on the GitHub repo - once it is implemented, that issue will be closed:
https://github.com/alunny/ChildBrowse...
Photo of Thomas Reinberger

Thomas Reinberger

  • 13 Posts
  • 0 Reply Likes
Whats the timeframe for updating the PGB ChildBrowser Plugin, given the feature is going to be implemented on my own?
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
No timeframe - we have lots of other stuff to do and it's not a priority. Patches welcome!
Photo of Thomas Reinberger

Thomas Reinberger

  • 13 Posts
  • 0 Reply Likes
Maybe my question wasn't expressed correctly. So in your terms: if I provide a patch, how long will it take until this patch is in your production system available?
Photo of Mark Hollas

Mark Hollas

  • 9 Posts
  • 1 Reply Like
Hi, I am having limited success getting this plugin to work on iOS. I followed the documentation however links I create using onClick="window.plugins.childBrowser.showWebPage('mypage.html'); do not fire at all, no action.

I have this in my index page
script type="text/javascript" charset="utf-8" src="childbrowser.js"

and this in my config
feature name="http://plugins.phonegap.com/childbrow..."

Is there something I am overlooking?

Thanks
Photo of Jason Stallings

Jason Stallings

  • 63 Posts
  • 4 Reply Likes
I'm so excited about this. This and a couple of other plugins, like sockets, are the only thing that's keeping me from using PhoneGap:Build exclusively.
Photo of Thomas Reinberger

Thomas Reinberger

  • 13 Posts
  • 0 Reply Likes
Andrew,

my company will provide a patch for the discussed functionality by the end of this week. It would be great if you could integrate it asap into your production environment.

Thomas
Photo of Thomas Reinberger

Thomas Reinberger

  • 13 Posts
  • 0 Reply Likes
Mark: what's your config?

I've been able to get the plugin working without any problems. Maybe you need to play around with specifying the phonegap version in your config.xml.

Thomas
Photo of Mark Hollas

Mark Hollas

  • 9 Posts
  • 1 Reply Like
Thanks for the reply.

as far as the config goes I have registered this
-feature name="http://plugins.phonegap.com/childbrow..." -
and my phonegap version reference is
-preference name="phonegap-version" value="1.4.1" -

I should also note that I cracked open my ipa to have a look and found that the childbrowser.js did not exist, I thought this would be added my the build just as phonegap.js is. So I got childbrowser.js from github and added it to my root. But still I get no response from
onClick="window.plugins.childBrowser.showWebPage('mypage.html');

Mark
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Thomas: if you submit the patch to github.com/alunny/ChildBrowser, assuming it merges cleanly, I can get it merged and integrated on PG Build in a few days.
Photo of Galvanized Studios

Galvanized Studios

  • 1 Post
  • 0 Reply Likes
Some plugins we use that would be great to get in Build: LocalNotification, facebook Connect, and NotificationEx. Great work guys!
Photo of hannes.danzl

hannes.danzl

  • 4 Posts
  • 0 Reply Likes
Just wanted to give my thumbs up for the configurable childbrowser buttons. I would really like to hide the URL for instance.
Photo of Thomas Reinberger

Thomas Reinberger

  • 13 Posts
  • 0 Reply Likes
Hi,

just wanted to say that I have the updated code ready to submit, but before that I want to verify that it really works. Furthermore I don't have no clue how actively commiting to github works, so I have to figure this out first.

@Mark: if you don't have the childbrowser.js in your ipa file, either something is wrong with your config or with PG:B.

That's my relevant parts of the config.xml:

Also you could try to replace your onClick stuff with a simple alert to see whether the code executes at all.

Thomas
Photo of Theodor Storm

Theodor Storm

  • 1 Post
  • 0 Reply Likes
I'm not getting this to work on Android either. Childbrowser.js isn't even included in the resulting apk. My config.xml contains
preference name="phonegap-version" value="1.4.1"
and
feature name="http://plugins.phonegap.com/ChildBrow..."

The (private) app is available at https://build.phonegap.com/apps/55481 if anyone in the PhoneGap team would like to take a look at what is going on.
Photo of Siarhei

Siarhei

  • 1 Post
  • 0 Reply Likes
Is there any chance to get Urban Airship Plugin integrated with PG Build service in near future?
Photo of hannes.danzl

hannes.danzl

  • 4 Posts
  • 0 Reply Likes
Theodor Storm: it seems the include for the js is broken while the code part seems to be included. get the js from the repository at https://github.com/alunny/ChildBrowse... and add it to your project before loading to phonebuild. This works for me
Photo of machenmusik

machenmusik

  • 4 Posts
  • 0 Reply Likes
according to

http://simonmacdonald.blogspot.com/20...

the ChildBrowser needs an intent which does not appear to be present...

is this needed, and if so can we get this added?

===

In step four we will need to modify the AndroidManifest.xml file to add an intent filter for the ChildBrowser. Paste the following lines inside the tag:
Photo of machenmusik

machenmusik

  • 4 Posts
  • 0 Reply Likes
hmm, I am wrong the intent is in the apk, but I can't get either iframe or ChildBrowser to display external web page
Photo of Thomas Reinberger

Thomas Reinberger

  • 13 Posts
  • 0 Reply Likes
Hi Andrew,

any news concerning my pull request for the Childbrowser Plugin?

Thomas
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
I've been a bit snowed under Thomas, but adding your patch is pencilled in for this week or next. Should have an update soon!
Photo of Mahmoud M. Abdel-Fattah

Mahmoud M. Abdel-Fattah

  • 19 Posts
  • 1 Reply Like
Hi Andrew, I couldn't use the plugin, posted a question here : http://community.phonegap.com/nitobi/... and got no reply yet
Photo of Vaibhav

Vaibhav

  • 32 Posts
  • 2 Reply Likes
hi ,
i am developing phonegap app with SQLITE DB functionality for Android tab.

All things where running smoothly before i integrated child browser plug in in my app.
After integrating, i am not able to open the application's Database .it is giving SECURITY_ERR :DOM Exception 18.

If you can help me to fix this issue.
Photo of Summved

Summved

  • 20 Posts
  • 0 Reply Likes
Hello,

I am getting the same issue as Vaibhav is facing i.e SECURITY_ERR :DOM Exception 18. Please suggest something.

Any help would be appreciated.
Photo of Vaibhav

Vaibhav

  • 32 Posts
  • 2 Reply Likes
hi Summved ,

I finally got the work around for the issue.

I just put following two lines above window.opendatabse function and now it works fine.

navigator.openDatabase = window.openDatabase = DroidDB_openDatabase;
window.droiddb = new DroidDB();

Demo application can be found at

https://github.com/vaibhavbparikh/Tes...

Hope this will help you as well .. :)
Photo of DZeit

DZeit

  • 42 Posts
  • 0 Reply Likes
The childBrowser-Plugin is really cool but it seems like it is not included on every build.
Sometimes the plugin is missing (in the ipa e.g.).
window.plugin then enlists no childBrowser.
After a rebuild (without code-changes) the childBrowser is back in the package again and window.plugins lists the childBrowser.

in my config.xml:
...
!-- include ChildBrowserPlugIn --
feature name="http://plugins.phonegap.com/ChildBrow..." /
...

in my index.html-header:
...
script type="application/javascript" src="jquery.xml2json.js" /script
script type="application/javascript" src="phonegap.js" /script
script type="application/javascript" src="childbrowser.js" /script
script type="application/javascript" src="json2.min.js" /script
...

Neither phonegap.js nor childbrowser.js are part of the uploaded source in the git-repository.

What can i do to make sure the Plugin is activated in every build?

BTW: Is is yet already better to reference cordova.js? It looks like it doesn't make a difference by now but when will this change?

Cheers,
André
Photo of Summved

Summved

  • 20 Posts
  • 0 Reply Likes
Hello,

I have used the Childbrowser plugin and it works fine for me if I am using it with standalone application. If I am using it with the web application then it is wiping out the session. I am getting certain value from the web service and maintaining it in a session so that I can use it anywhere in the application. As soon as I call the childbrowser then the session is wiped out

Any help would be appreciated

Kind Regards,
Summved

This conversation is no longer open for comments or replies.