为了和另一个 uhf 插件区分,修改为 uhfcom13

This commit is contained in:
巫翔 2021-12-21 18:21:35 +08:00
parent b8fb662396
commit 4616b6e8eb
6 changed files with 19 additions and 19 deletions

View File

@ -5,10 +5,10 @@
## 安装 ## 安装
使用 Cordova 使用 Cordova
<pre>cordova plugin add https://github.com/shuto-cn/UHFCom13</pre> <pre>cordova plugin add http://m.shuto.cn:8680/center/UHFCom13</pre>
使用 Ionic 使用 Ionic
<pre>ionic cordova plugin add https://github.com/shuto-cn/UHFCom13</pre> <pre>ionic cordova plugin add http://m.shuto.cn:8680/center/UHFCom13</pre>
## 示例程序 ## 示例程序
https://github.com/shuto-cn/UHFRDEMO https://github.com/shuto-cn/UHFRDEMO

View File

@ -1,9 +1,9 @@
{ {
"name": "cordova-plugin-uhf", "name": "cordova-plugin-uhfcom13",
"version": "0.0.1", "version": "0.0.1",
"description": "", "description": "",
"cordova": { "cordova": {
"id": "cordova-plugin-uhf", "id": "cordova-plugin-uhfcom13",
"platforms": [ "platforms": [
"android" "android"
] ]

View File

@ -1,23 +1,23 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-uhf" version="0.0.2" <plugin id="cordova-plugin-uhfcom13" version="0.0.2"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns="http://apache.org/cordova/ns/plugins/1.0"> xmlns:android="http://schemas.android.com/apk/res/android" xmlns="http://apache.org/cordova/ns/plugins/1.0">
<name>Cordova UHF Plugin</name> <name>Cordova UHFCom13 Plugin</name>
<js-module name="cordova-plugin-uhf" src="www/cordova-plugin-uhf.js"> <js-module name="cordova-plugin-uhfcom13" src="www/cordova-plugin-uhfcom13.js">
<clobbers target="cordova.plugin.uhf"/> <clobbers target="cordova.plugin.uhfcom13"/>
</js-module> </js-module>
<platform name="android"> <platform name="android">
<config-file parent="/*" target="res/xml/config.xml"> <config-file parent="/*" target="res/xml/config.xml">
<feature name="UHF"> <feature name="UHFCom">
<param name="android-package" value="cordova.plugin.uhf.UHF"/> <param name="android-package" value="cordova.plugin.uhfcom.UHFCom13"/>
</feature> </feature>
</config-file> </config-file>
<source-file src="src/android/cordova/plugin/uhf/UHF.java" <source-file src="src/android/cordova/plugin/uhfcom/UHFCom13.java"
target-dir="src/cordova/plugin/uhf"/> target-dir="cordova/plugin/uhfcom"/>
<source-file src="src/android/cordova/plugin/uhf/Util.java" <source-file src="src/android/cordova/plugin/uhfcom/Util.java"
target-dir="src/cordova/plugin/uhf"/> target-dir="cordova/plugin/uhfcom"/>
<source-file src="src/android/uhfcom13_v15.jar" target-dir="libs"/>
<source-file src="src/android/SerialPort.jar" target-dir="libs"/>
<lib-file src="src/android/uhfcom13_v15.jar" />
<lib-file src="src/android/SerialPort.jar" />
<resource-file src="src/android/libs/armeabi/libdevapi.so" <resource-file src="src/android/libs/armeabi/libdevapi.so"
target="jniLibs/armeabi/libdevapi.so"/> target="jniLibs/armeabi/libdevapi.so"/>

View File

@ -1,4 +1,4 @@
package cordova.plugin.uhf; package cordova.plugin.uhfcom;
import android.util.Log; import android.util.Log;
import cn.pda.serialport.Tools; import cn.pda.serialport.Tools;
@ -18,7 +18,7 @@ import java.util.Objects;
* 超高频UHF读写卡插件 * 超高频UHF读写卡插件
* 因不同的机型使用的so库不同故无法适配所有机型 * 因不同的机型使用的so库不同故无法适配所有机型
*/ */
public class UHF extends CordovaPlugin { public class UHFCom13 extends CordovaPlugin {
private UhfReader manager; private UhfReader manager;
private String selectedEpc = ""; private String selectedEpc = "";
private byte[] password = Tools.HexString2Bytes("00000000"); private byte[] password = Tools.HexString2Bytes("00000000");

View File

@ -1,4 +1,4 @@
package cordova.plugin.uhf; package cordova.plugin.uhfcom;
import java.util.HashMap; import java.util.HashMap;
import java.util.Locale; import java.util.Locale;