I've been trying to install a custom cordova plugin (not available in the ngCordova library) in my Ionic project which will enable me to take a picture with no user input on Android:
I've been struggling with integrating this properly into my Ionic App, and am not sure how to:
a) Implement deviceready as per Cordova documentation:
document.addEventListener("deviceready", yourCallbackFunction, false);
b) Call function within Ionic without app crashing.
Instead of deviceready
on the device, try using ionic's built in ready method, that fires when Cordova, Angular, and Ionic are ready.
ionic.Platform.ready(function(){
//do plugin stuff here
});