I am working on an simple Phonegap App with Cordova InAppBrowser. I am testing on my Android device.
In the config.xml I got the below code
<preference name="phonegap-version" value="cli-5.2.0" /> I tried with 6.0.0 also...
<plugin name="org.apache.cordova.inappbrowser" source="pgb" />
var ref = cordova.InAppBrowser.open('http://google.com', '_blank', 'location=yes','fullscreen=no');
I use Phonegap Desktop App for testing purposes. In that when the button is touched a browser window got opened and I could see the google.
But when I build the same via http://build.phonegap.com and install on my device. Nothing opens after I touch the button. Something goes wrong here.
Looks strange for me. Any help is appreciated.
I would use the npm hosted plugin and the new reference:
<plugin name="cordova-plugin-inappbrowser" source="npm"/>
also be aware the config,xml files are different between the desktop app solution and Phonegap Build.
<plugin name="cordova-plugin-inappbrowser" />
Some helpful links:
Your solution also works great.