40 lines
837 B
JavaScript
Raw Normal View History

2015-11-24 16:55:09 -06:00
document.addEventListener('deviceready', function() {
console.log(window.Native);
alert('in here!');
if(Native.Camera.installed()) {
alert('here!');
console.log('Camera installed');
} else {
alert('No cam');
console.log('Camera not installed');
}
2015-11-24 17:16:39 -06:00
/*
2015-11-24 16:55:09 -06:00
Native.Camera.takePicture().then(function(resp) {
console.log('Got picture');
}, function(err) {
console.log('ERROR');
});
if(Native.AppLinks.installed()) {
console.log('AppLinks installed');
} else {
console.log('AppLinks not installed');
}
2015-11-24 17:16:39 -06:00
*/
2015-11-24 16:55:09 -06:00
if(Native.StatusBar.installed()) {
console.log('StatusBar installed');
2015-11-24 17:16:39 -06:00
Native.StatusBar.hide().catch(function(err) {
console.error('unable to set statusbar', err);
});
2015-11-24 16:55:09 -06:00
} else {
alert('No statusbar');
console.log('StatusBar not installed');
}
})