工作中开发的一个优盘监听插件
功能:监听优盘拔插事件
用于安卓板开发,获得优盘插入和优盘路径
参考链接:
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
网友评论