工作中開發(fā)的一個優(yōu)盤監(jiān)聽插件
功能:監(jiān)聽優(yōu)盤拔插事件
用于安卓板開發(fā),獲得優(yōu)盤插入和優(yōu)盤路徑
參考鏈接:
github xy-plugin-udisk
npm xy-plugin-udisk
Cordova plugin xy-plugin-udisk
use android broadcast receiver to listen udisk or sd card event: mounted/unmounted/removed
js-module
cordova.plugins.udisk
cordova.plugins.udisk.prototype = eventEmitter
methods
cordova.plugins.udisk.init()
init must after excute deviceready
cordova.plugins.udisk.on()
cordova.plugins.udisk.emit()
events
cordova.plugins.udisk.on('mounted', (url) => {});
cordova.plugins.udisk.on('unmounted', (url) => {});
cordova.plugins.udisk.on('removed', (url) => {});
native/android
Udisk.java
LICENSE
Apache 2.0