Posts

Showing posts with the label Phonegap Plugins

Cordova InAppBrowser - How To Disable URL And Navigation Bar?

Answer : To remove the URL, just set the ' location ' option to " no ". var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=no'); On Android, this removes the 'Back/Forward' buttons, URL and 'Done' button, not just the URL, but thankfully there’s a special Android-only ‘ hideurlbar ’ option to remove ONLY the URL. var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', ‘hideurlbar=yes’); The 'Done' button text can be changed by adding a ' closebuttoncaption ' option. (Now works on Android if using InAppBrowser plugin v2.0.2 or above.) var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'closebuttoncaption=My Button Name'); On iOS, the toolbar can be removed by setting the ' toolbar ' option to " no ". var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'toolbar=no'...

Cordova - Current Working Directory Is Not A Cordova-based Project

Answer : If you are getting this error on Ionic2 This issue generally occur when we just clone / download app and try to add platform to it. its very easy to resolve, then here are the steps- just create a "www" directory in application root. "./www" can also do by this command- mkdir www now we can easily run following command - ionic platform add android or ionic platform add ios Hope it will help!!! Solution is to make sure there's a www/ directory inside the root directory. mkdir www make sure your .gitignore file doesn't include www/ directory on it. Yes, as QuickFix said, you need to be in a Cordova project before being able to use most of cordova Commands. If you are curious about what defines a Cordova project, this is what I found: Has a .cordova directory, with a config.json inside. Has a www directory, with a config.xml inside. Has a platforms directory. With that in place you can use Cordoba commands without problem. If you need examples o...