mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-04-24 03:00:11 -04:00
19 lines
433 B
JavaScript
19 lines
433 B
JavaScript
/**
|
|
* HeadsetWatcher plugin for Cordova/Phonegap
|
|
*
|
|
* Copyright (c) Triggertrap Ltd. 2012. All Rights Reserved.
|
|
* Available under the terms of the MIT License.
|
|
*
|
|
*/
|
|
var HeadsetWatcher = {
|
|
watch: function(callback) {
|
|
return cordova.exec(function(result) {
|
|
HeadsetWatcher.plugged = result.plugged;
|
|
if(callback) {
|
|
callback(result);
|
|
}
|
|
|
|
}, HeadsetWatcher.fail, "HeadsetWatcher", "watch", []);
|
|
},
|
|
plugged: false
|
|
} |