2015-11-25 06:55:09 +08: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-25 07:16:39 +08:00
|
|
|
/*
|
2015-11-25 06:55:09 +08: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-25 07:16:39 +08:00
|
|
|
*/
|
2015-11-25 06:55:09 +08:00
|
|
|
|
|
|
|
if(Native.StatusBar.installed()) {
|
|
|
|
console.log('StatusBar installed');
|
2015-11-25 07:16:39 +08:00
|
|
|
Native.StatusBar.hide().catch(function(err) {
|
|
|
|
console.error('unable to set statusbar', err);
|
|
|
|
});
|
2015-11-25 06:55:09 +08:00
|
|
|
} else {
|
|
|
|
alert('No statusbar');
|
|
|
|
console.log('StatusBar not installed');
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|