n above blog post, I have to debug using a real device. In this code
if((window.device && device.platform == "Android") && typeof inappbilling !== "undefined") {
inappbilling.init(function(resultInit) {
console.log("IAB Initialized");
},
function(errorInit) {
console.log("ERROR -> " + errorInit);
},
{showLog: true},
["productId1", "productId2", "productId3"]);
}
how can I see the console.log in my device?
this post contains the answer to your question. Basically, you need to have the latest ionicframework release installed (npm install -g ionic
or npm update -g ionic
fo update)
Not only can you run LiveReload, you can also access console logs from the device and server logs showing which files the device is requesting. This lets you build your app quickly in the browser, then debug it on an actual device or emulator (Genymotion works, too). How do you start it? You can pass a few flags, in any combination, in your run/emulate commands:
Examples:
$ ionic emulate ios --livereload --consolelogs --serverlogs
$ ionic run android -l -c -s
This displays the logs in the command line (Terminal) and updates your App in the device each time the code changed...