phonegap console plugin example

Apache Cordova / phonegap console is used for displaying text (or) variable on the browser or debugging console which will used for mobile application debugging option. you can use google chrome developer option or GapDebug (https://www.genuitec.com/products/gapdebug/) for debugging your html5 based mobile applications

phonegap console plugin Installation

cordova plugin add org.apache.cordova.console

MethodsĀ 
In phonegap console, there is a method / function called console.log() is used to print variable or text to the browser or debugging console

console.log("text") or console.log(variable)

Apache Cordova / phonegap Console plugin example

create your phonegap project and add these lines to your index.js


document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady(){
console.log("console.log works well");
}

Output : It’ll return “console.log works” well when your mobile application is ready

Share This

Share this post with your friends!