I can’t get the childbrowser to work on Android.
I have followed the instructions on: https://github.com/brycecurtis/phonegap-plugins/tree/master/Android/ChildBrowser/
I have installed Eclipse and all the other stuff needed to compile an
app and all works as it should.
It is running in the emulator and I can also create an apk file.
So now I’m trying to get the childbrowser to work, like below.
- I added the childbrowser.java file in my workspace/appname/
src/com/phonegap/plugins/childBrowser/ folder. - And the childbrowser.js file in my workspace/appname/assets/www/
folder. - I have linked to the phonegap.0.9.4.js and the childBrowser.js
files in my index file. - I added this in the manifest file
> <activity android:name="com.phonegap.DroidGap" > android:label="@string/app_name"> > <intent-filter> > </intent-filter> > </activity>
- The link that should open the childbrowser looks like this:
<a href="#" onClick="window.plugins.childBrowser.showWebPage("thewebpage.html");">Open</a>
And it still isn’t working? I’m just testing in the emulator as I don’t have a android phone here right now, isn’t the childbrowser working in the emulator?
Or have I missed something else?
Thanks.
I use phonegap.0.9.4.js as well and it is working for me. The childBrowser should work after PhoneGap JS throws event ‘deviceready’. So I added the following code.
Some tips, as I encountered some issues as well: