(action, args = [])
| 1 | function execSystem(action, args = []) { |
| 2 | return new Promise((resolve, reject) => { |
| 3 | if (!window.cordova?.exec) { |
| 4 | reject(new Error("Cordova exec is unavailable.")); |
| 5 | return; |
| 6 | } |
| 7 | |
| 8 | cordova.exec(resolve, reject, "System", action, args); |
| 9 | }); |
| 10 | } |
| 11 | |
| 12 | export default { |
| 13 | async getStatus() { |