cordova_plugins.js中的一些參數說明:
module.exports 中的id對應的自定義js中的cordova.define的第一參數
file:插件的調用js路徑,別瞎改
pluginId:無關緊要,創建的項目id
clobbers:你要調用的對象名
自定義插件中的xml
clobbers:對應別名與cordova_plugins.js中的clobbers一致
plugin:中id對應cordova插件列表中的名字與cordova_plugins.js中的pluginId一致
<feature name="bletest">
<param name="android-package" value="com.laysolitary.bletest" />
</feature>
value:與是包名+類名,不然會報錯Class空指針
<source-file src="src/android/bletest.java" target-dir="src/com/laysolitary" />
target-dir:對應存放類的包名