commit 14a1ff696c7856a31e9304beb8e84e7aeeaa401f Author: wanghao Date: Mon Jan 19 14:22:12 2026 +0800 双箭输送带 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..603b140 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..681f41a --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,116 @@ + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..61a9130 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/dictionaries/gougo.xml b/.idea/dictionaries/gougo.xml new file mode 100644 index 0000000..dc499ce --- /dev/null +++ b/.idea/dictionaries/gougo.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..674414f --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..0fa5d15 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..c4c95f6 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + Android + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..e497da9 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..6b98ff7 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,48 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.2" + defaultConfig { + applicationId "com.example.hightschool" + minSdkVersion 21 + targetSdkVersion 30 + versionCode 2 + versionName "1.0" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + ndk { + // 设置支持的SO库架构 + abiFilters 'armeabi' ,'arm64-v8a','armeabi-v7a' + + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.recyclerview:recyclerview:1.1.0' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'androidx.test.ext:junit:1.1.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + implementation 'com.jakewharton:butterknife:10.2.0' + annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0' +// implementation files('libs\\uhf_r_v1.0.jar') + implementation files('libs\\uhfr_v1.8.jar') + implementation files('libs\\ModuleAPI_J.jar') + implementation files('libs\\jxl.jar') + implementation 'org.litepal.guolindev:core:3.2.3' + implementation 'com.google.android.material:material:1.2.1' +} diff --git a/app/debug/app-debug.apk b/app/debug/app-debug.apk new file mode 100644 index 0000000..70d72eb Binary files /dev/null and b/app/debug/app-debug.apk differ diff --git a/app/debug/output.json b/app/debug/output.json new file mode 100644 index 0000000..92a0784 --- /dev/null +++ b/app/debug/output.json @@ -0,0 +1 @@ +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-debug.apk","fullName":"debug","baseName":"debug"},"path":"app-debug.apk","properties":{}}] \ No newline at end of file diff --git a/app/debug/双箭增加带宽数量.apk b/app/debug/双箭增加带宽数量.apk new file mode 100644 index 0000000..f61c11a Binary files /dev/null and b/app/debug/双箭增加带宽数量.apk differ diff --git a/app/debug/扫描EPC匹配后置位改写新规则V1.1.apk b/app/debug/扫描EPC匹配后置位改写新规则V1.1.apk new file mode 100644 index 0000000..c344da1 Binary files /dev/null and b/app/debug/扫描EPC匹配后置位改写新规则V1.1.apk differ diff --git a/app/debug/浙江双箭RFID输送带信息管理系统v4.2.apk b/app/debug/浙江双箭RFID输送带信息管理系统v4.2.apk new file mode 100644 index 0000000..6a3a63c Binary files /dev/null and b/app/debug/浙江双箭RFID输送带信息管理系统v4.2.apk differ diff --git a/app/libs/ModuleAPI_J.jar b/app/libs/ModuleAPI_J.jar new file mode 100644 index 0000000..b231d74 Binary files /dev/null and b/app/libs/ModuleAPI_J.jar differ diff --git a/app/libs/jxl.jar b/app/libs/jxl.jar new file mode 100644 index 0000000..daf1158 Binary files /dev/null and b/app/libs/jxl.jar differ diff --git a/app/libs/uhfr_v1.8.jar b/app/libs/uhfr_v1.8.jar new file mode 100644 index 0000000..44c1a70 Binary files /dev/null and b/app/libs/uhfr_v1.8.jar differ diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..f1b4245 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json new file mode 100644 index 0000000..3ad633e --- /dev/null +++ b/app/release/output-metadata.json @@ -0,0 +1,18 @@ +{ + "version": 2, + "artifactType": { + "type": "APK", + "kind": "Directory" + }, + "applicationId": "com.example.hightschool", + "variantName": "release", + "elements": [ + { + "type": "SINGLE", + "filters": [], + "versionCode": 2, + "versionName": "1.0", + "outputFile": "app-release.apk" + } + ] +} \ No newline at end of file diff --git a/app/release/双箭 25年.apk b/app/release/双箭 25年.apk new file mode 100644 index 0000000..bd3b187 Binary files /dev/null and b/app/release/双箭 25年.apk differ diff --git a/app/src/androidTest/java/com/example/hightschool/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/example/hightschool/ExampleInstrumentedTest.java new file mode 100644 index 0000000..776fffc --- /dev/null +++ b/app/src/androidTest/java/com/example/hightschool/ExampleInstrumentedTest.java @@ -0,0 +1,27 @@ +package com.example.hightschool; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + + assertEquals("com.example.hightschool", appContext.getPackageName()); + } +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..3d3b6a4 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/assets/litepal.xml b/app/src/main/assets/litepal.xml new file mode 100644 index 0000000..9a90f07 --- /dev/null +++ b/app/src/main/assets/litepal.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/example/hightschool/BaseActivity.java b/app/src/main/java/com/example/hightschool/BaseActivity.java new file mode 100644 index 0000000..498af87 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/BaseActivity.java @@ -0,0 +1,75 @@ +package com.example.hightschool; + +import androidx.appcompat.app.AppCompatActivity; + +import android.app.ProgressDialog; +import android.media.MediaPlayer; +import android.os.Bundle; +import android.view.Window; + +import com.handheld.uhfr.UHFRManager; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import cn.pda.serialport.Tools; + +//import cn.pda.serialport.Tools; + +public class BaseActivity extends AppCompatActivity { + public UHFRManager uhfrManager; + public byte[] accessBytes = Tools.HexString2Bytes("00000000"); + public MediaPlayer mediaPlayer; + //2 + List months; + //3 + List jts; + //4 + public List dqs; + //5 + public List dks; + //6 7 + public List hds; + //8 + public List jbs; + //9 10 + public List sxs; + //11 12 + public List jgs; + public MyDialog dialog; + public MyDialog1 dialog1; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (uhfrManager==null){ + uhfrManager=MyApp.getUhfrManager(); + } + mediaPlayer= MediaPlayer.create(this, R.raw.msg); + months= Arrays.asList(getResources().getStringArray(R.array.month)); + jts= Arrays.asList(getResources().getStringArray(R.array.jitai)); + dqs= Arrays.asList(getResources().getStringArray(R.array.daiqiang)); + dks= Arrays.asList(getResources().getStringArray(R.array.daikuan)); + hds= Arrays.asList(getResources().getStringArray(R.array.houdu)); + jbs= Arrays.asList(getResources().getStringArray(R.array.gaijiao)); + sxs= Arrays.asList(getResources().getStringArray(R.array.xuhao)); + jgs= Arrays.asList(getResources().getStringArray(R.array.jiange)); + dialog=new MyDialog(this); + dialog1=new MyDialog1(this); + + } + + + @Override + protected void onDestroy() { + super.onDestroy(); +// if (uhfrManager!=null){ +// uhfrManager.close(); +// uhfrManager=null; +// } + } + + + + +} diff --git a/app/src/main/java/com/example/hightschool/InfoActivity.java b/app/src/main/java/com/example/hightschool/InfoActivity.java new file mode 100644 index 0000000..9824d68 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/InfoActivity.java @@ -0,0 +1,95 @@ +package com.example.hightschool; + +import android.os.Bundle; +import android.util.Log; + +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.example.hightschool.adapter.InfoAdape; +import com.example.hightschool.dialog.EditTextDialog; +import com.example.hightschool.entity.Info; +import com.google.android.material.tabs.TabLayout; + +import org.litepal.LitePal; + +import java.util.List; + +import butterknife.BindView; +import butterknife.ButterKnife; +import butterknife.OnClick; + +public class InfoActivity extends BaseActivity implements TabLayout.OnTabSelectedListener, InfoAdape.ItemClickInterface, EditTextDialog.DialogCall { + + @BindView(R.id.info_tabLayout) + TabLayout infoTabLayout; + @BindView(R.id.info_recyclerView) + RecyclerView infoRecyclerView; + private List infoList; + private String infoType; + private InfoAdape adape; + private EditTextDialog textDialog; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_info); + ButterKnife.bind(this); + infoType = "生产厂家"; + infoTabLayout.addOnTabSelectedListener(this); + infoList = LitePal.where("type = ?", infoType).find(Info.class); +// Log.e("TAG", "onCreate:" + infoList.toString()); + infoRecyclerView.setLayoutManager(new LinearLayoutManager(this)); + adape = new InfoAdape(this, this); + textDialog = new EditTextDialog(this); + textDialog.setCall(this); + adape.setList(infoList); + infoRecyclerView.setAdapter(adape); + } + + + @Override + public void onTabSelected(TabLayout.Tab tab) { + infoType = tab.getText().toString(); + Log.e("TAG", "切换到:" + infoType); + infoList.clear(); + infoList.addAll(LitePal.where("type = ?", infoType).find(Info.class)); + Log.e("TAG", "onTabSelected:" + infoList); + adape.notifyDataSetChanged(); + } + + @Override + public void onTabUnselected(TabLayout.Tab tab) { +// Log.e("TAG", "onTabUnselected:" + tab.getText()); + } + + @Override + public void onTabReselected(TabLayout.Tab tab) { +// Log.e("TAG", "onTabReselected:" + tab.getText()); + } + + @Override + public void onItemClick(int index) { + Info info = infoList.get(index); + infoList.remove(index); + adape.notifyDataSetChanged(); + LitePal.delete(Info.class, info.getId()); + } + + //弹出框返回值,储存和刷新界面 + @Override + public void inputTextCall(String text) { + Info info = new Info(); + info.setType(infoType); + info.setName(text); + info.save(); + infoList.add(info); + adape.notifyDataSetChanged(); + } + + @OnClick(R.id.info_add) + public void onClick() { + + textDialog.show(); + } +} \ No newline at end of file diff --git a/app/src/main/java/com/example/hightschool/MainActivity.java b/app/src/main/java/com/example/hightschool/MainActivity.java new file mode 100644 index 0000000..725b7e7 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/MainActivity.java @@ -0,0 +1,40 @@ +package com.example.hightschool; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; + +import androidx.appcompat.app.AppCompatActivity; + +import butterknife.ButterKnife; +import butterknife.OnClick; + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + ButterKnife.bind(this); + } + + @OnClick({R.id.radioButton1, R.id.radioButton2,R.id.radioButton3}) + public void onViewClicked(View view) { + Intent intent=null; + switch (view.getId()) { + case R.id.radioButton1: + intent=new Intent(this, WriteActivity.class); + break; + case R.id.radioButton2: + intent=new Intent(this, ReedActivity.class); + break; + case R.id.radioButton3: + intent=new Intent(this, InfoActivity.class); + break; + + + } + if (intent!=null) + this.startActivity(intent); + } +} diff --git a/app/src/main/java/com/example/hightschool/MyApp.java b/app/src/main/java/com/example/hightschool/MyApp.java new file mode 100644 index 0000000..87ede69 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/MyApp.java @@ -0,0 +1,33 @@ +package com.example.hightschool; + +import android.app.Application; + +import com.handheld.uhfr.UHFRManager; + +import org.litepal.LitePal; + +/** + * Created by wangh on 2021/2/1-10:14。 + */ +public class MyApp extends Application { + public static UHFRManager uhfrManager; + + public static UHFRManager getUhfrManager() { + if (uhfrManager == null) { + uhfrManager = UHFRManager.getInstance(); + uhfrManager.setPower(30, 30); + } + return uhfrManager; + } + + @Override + public void onCreate() { + super.onCreate(); + + LitePal.initialize(this); + uhfrManager = UHFRManager.getInstance(); + uhfrManager.setPower(30, 30); + SharedPreferencesUtils.init(getApplicationContext(), "myapp"); + } + +} diff --git a/app/src/main/java/com/example/hightschool/MyDialog.java b/app/src/main/java/com/example/hightschool/MyDialog.java new file mode 100644 index 0000000..69643c5 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/MyDialog.java @@ -0,0 +1,64 @@ +package com.example.hightschool; + +import android.app.Dialog; +import android.content.Context; +import android.os.Bundle; +import android.view.View; +import android.widget.TextView; + +import androidx.annotation.NonNull; + +import butterknife.BindView; +import butterknife.OnClick; + +/** + * Created by wangh on 2021/3/1-17:29。 + */ +public class MyDialog extends Dialog implements View.OnClickListener { + TextView dialogButton; + TextView info; + String infoText; + public DialogCilck dialogCilck; + public interface DialogCilck{ + void OnClickListener(); + } + + public void setDialogCilck(DialogCilck dialogCilck) { + this.dialogCilck = dialogCilck; + } + + public void setInfoText(String infoText) { + this.infoText = infoText; + } + + public MyDialog(@NonNull Context context) { + super(context,R.style.CustomDialog); + + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.dialog_layout); + dialogButton=findViewById(R.id.dialog_button); + info=findViewById(R.id.dialog_info); + dialogButton.setOnClickListener(this); + setCancelable(false); + } + + + @Override + public void onClick(View view) { + dismiss(); + if (dialogCilck!=null){ + dialogCilck.OnClickListener(); + + } + } + + @Override + public void show() { + super.show(); + info.setText(infoText); + } +} diff --git a/app/src/main/java/com/example/hightschool/MyDialog1.java b/app/src/main/java/com/example/hightschool/MyDialog1.java new file mode 100644 index 0000000..8a45f1f --- /dev/null +++ b/app/src/main/java/com/example/hightschool/MyDialog1.java @@ -0,0 +1,61 @@ +package com.example.hightschool; + +import android.app.Dialog; +import android.content.Context; +import android.os.Bundle; +import android.view.View; +import android.widget.TextView; + +import androidx.annotation.NonNull; + +/** + * Created by wangh on 2021/3/1-17:29。 + */ +public class MyDialog1 extends Dialog implements View.OnClickListener { + TextView dialogButton; + TextView info; + String infoText; + public DialogCilck1 dialogCilck; + public MyDialog1(@NonNull Context context) { + super(context,R.style.CustomDialog); + + } + + public void setDialogCilck(DialogCilck1 dialogCilck) { + this.dialogCilck = dialogCilck; + } + + public interface DialogCilck1{ + void OnClickListener(); + } + public void setInfoText(String infoText) { + this.infoText = infoText; + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.dialog_layout1); + dialogButton=findViewById(R.id.dialog_button); + dialogButton.setOnClickListener(this); + info=findViewById(R.id.dialog_info); + setCancelable(false); + } + + + @Override + public void onClick(View view) { + dismiss(); + if(dialogCilck!=null){ + dialogCilck.OnClickListener(); + + } + } + + + @Override + public void show() { + super.show(); + info.setText(infoText); + } +} diff --git a/app/src/main/java/com/example/hightschool/ReedActivity.java b/app/src/main/java/com/example/hightschool/ReedActivity.java new file mode 100644 index 0000000..9e4bbf4 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/ReedActivity.java @@ -0,0 +1,184 @@ +package com.example.hightschool; + +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.KeyEvent; +import android.view.View; +import android.widget.TextView; +import android.widget.Toast; + +import com.example.hightschool.entity.Info; +import com.uhf.api.cls.Reader; + +import org.litepal.LitePal; + +import java.util.ArrayList; +import java.util.List; + +import butterknife.BindView; +import butterknife.ButterKnife; +import butterknife.OnClick; +import cn.pda.serialport.Tools; + +public class ReedActivity extends BaseActivity { + + @BindView(R.id.reed_epc) + TextView reedEpc; + @BindView(R.id.reed_year) + TextView reedYear; + @BindView(R.id.reed_month) + TextView reedMonth; + @BindView(R.id.reed_jitai) + TextView reedJitai; + @BindView(R.id.reed_daiqiang) + TextView reedDaiqiang; + @BindView(R.id.reed_daikuan) + TextView reedDaikuan; + @BindView(R.id.reed_shangjiaohoudu) + TextView reedShangjiaohoudu; + @BindView(R.id.reed_xiajiaohoudu) + TextView reedXiajiaohoudu; + @BindView(R.id.reed_gaijiaojibie) + TextView reedGaijiaojibie; + @BindView(R.id.reed_juanhao) + TextView reedJuanhao; + @BindView(R.id.reed_rfidshunxu) + TextView reedRfidshunxu; + @BindView(R.id.reed_jiange1) + TextView reedJiange1; + @BindView(R.id.reed_jiange2) + TextView reedJiange2; + + @BindView(R.id.reed_shengchanchangjia) + TextView reedSccj; + @BindView(R.id.reed_anzhuangdidian) + TextView reedAzdd; + private List stringList1; + private List stringList2; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_reed); + ButterKnife.bind(this); +// +// int[] i=uhfrManager.getPower(); +// Log.e("TAG", "onCreate:" + i[0]+"\n"+i[1]); + } + + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + Log.e("TAG", "onKeyDown:" + keyCode); + if (keyCode == 135) { + reedepc(); + } else if (keyCode == 4) { + finish(); + } + + return true; + } + + private void reedepc() { + byte[] readBytes = new byte[14]; + if (uhfrManager == null) { + uhfrManager = MyApp.getUhfrManager(); + } + Reader.READER_ERR reader_err = uhfrManager.getTagData(1, 2, 7, readBytes, accessBytes, (short) 1000); + Log.e("TAG", "san_epc:" + reader_err); + if (reader_err.toString().equals("MT_OK_ERR")) { + mediaPlayer.start(); + String epc = Tools.Bytes2HexString(readBytes, readBytes.length); + rerd_view(epc); + } else { + dialog1.setInfoText("读取失败"); + dialog1.show(); + reedEpc.setText(null); + clear(); + } + + } + + @OnClick({R.id.reed_button, R.id.reed_cler}) + public void onViewClicked(View view) { + switch (view.getId()) { + case R.id.reed_button: + reedepc(); + break; + case R.id.reed_cler: + clear(); + reedEpc.setText(null); + break; + } + } + + private void clear() { + reedYear.setText(null); + reedMonth.setText(null); + reedJitai.setText(null); + reedDaiqiang.setText(null); + reedDaikuan.setText(null); + reedShangjiaohoudu.setText(null); + reedXiajiaohoudu.setText(null); + reedGaijiaojibie.setText(null); + reedJuanhao.setText(null); + reedRfidshunxu.setText(null); + reedJiange1.setText(null); + reedJiange2.setText(null); + reedSccj.setText(null); + reedAzdd.setText(null); + } + + private void rerd_view(String epc) { + reedEpc.setText(epc); + try { + reedYear.setText("20" + epc.substring(0, 2)); + reedMonth.setText(Integer.parseInt(epc.substring(2, 3), 16) + ""); + reedJitai.setText(epc.substring(3, 5)); + reedDaiqiang.setText(dqs.get(Integer.parseInt(epc.substring(5, 7)) - 1)); + reedDaikuan.setText(dks.get(Integer.parseInt(epc.substring(7, 9))-1)); + reedShangjiaohoudu.setText(hds.get(Integer.parseInt(epc.substring(9, 11)) - 1)); + reedXiajiaohoudu.setText(hds.get(Integer.parseInt(epc.substring(12, 14)) - 1)); + reedGaijiaojibie.setText(jbs.get(Integer.parseInt(epc.substring(14, 16)) - 1)); + reedJuanhao.setText(epc.substring(16, 18)); + reedRfidshunxu.setText(epc.substring(18, 20)); + reedJiange1.setText(epc.substring(20, 22)); + reedJiange2.setText(epc.substring(22, 24)); + int data2426 = Integer.parseInt(epc.substring(24, 26))-1; + reedSccj.setText(stringList1.get(data2426)); + int data2628 = Integer.parseInt(epc.substring(26, 28))-1; + reedAzdd.setText(stringList2.get(data2628)); + + } catch (Exception e) { + dialog1.setInfoText("不是按标准写入的标签"); + dialog1.show(); + clear(); + + e.printStackTrace(); + return; + + } + + } + + @Override + protected void onResume() { + super.onResume(); + List infoList = LitePal.findAll(Info.class); + if (infoList.isEmpty()) { + startActivity(new Intent(this, InfoActivity.class)); + Toast.makeText(this, "先维护数据", Toast.LENGTH_SHORT).show(); + return; + } + stringList1 = new ArrayList<>(); + stringList2 = new ArrayList<>(); + for (Info info : infoList) { + if (info.getType().equals("生产厂家")) { + stringList1.add(info.getName()); + } else { + stringList2.add(info.getName()); + } + } + + } +} diff --git a/app/src/main/java/com/example/hightschool/SharedPreferencesUtils.java b/app/src/main/java/com/example/hightschool/SharedPreferencesUtils.java new file mode 100644 index 0000000..e297052 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/SharedPreferencesUtils.java @@ -0,0 +1,86 @@ +package com.example.hightschool; + +import android.content.Context; +import android.content.SharedPreferences; + +/** + * Created by wang 18/7/5 + */ + +public class SharedPreferencesUtils { + private static SharedPreferences sharedPreferences; + private static SharedPreferences.Editor edit; + + public static void init(Context context, String name) { + sharedPreferences = context.getSharedPreferences(name, context.MODE_PRIVATE); + edit = sharedPreferences.edit(); + edit.commit(); + } + + public static void putstring(String key, String value) { + if (edit != null) { + edit.putString(key, value); + edit.commit(); + } + } + public static void putInt(String key, int value) { + if (edit != null) { + edit.putInt(key, value); + edit.commit(); + } + } + + public static int getInt(String key, int value) { + if (sharedPreferences != null) { + return sharedPreferences.getInt(key,value); + } + return 0; + } + + + public static void putboolean(String key, boolean value) { + if (edit != null) { + edit.putBoolean(key, value); + edit.commit(); + } + } + + /** + * 取得方法 + */ + + public static String getstring(String key, String deaflut) { + if (sharedPreferences != null) { + return sharedPreferences.getString(key, deaflut); + } + return ""; + } + + public static boolean getboolean(String key, boolean aaa) { + if (sharedPreferences != null) { + boolean aBoolean = sharedPreferences.getBoolean(key, aaa); + return aBoolean; + } + return false; + } + + /** + * remo + */ + public static void removeKey(String key) { + if (edit != null) { + edit.remove(key); + edit.commit(); + } + } + public static void Clean() { + //清空数据 + try { + edit.clear(); + edit.commit(); + }catch (Exception e){ + e.printStackTrace(); + } + + } +} diff --git a/app/src/main/java/com/example/hightschool/WriteActivity.java b/app/src/main/java/com/example/hightschool/WriteActivity.java new file mode 100644 index 0000000..44e1a5f --- /dev/null +++ b/app/src/main/java/com/example/hightschool/WriteActivity.java @@ -0,0 +1,222 @@ +package com.example.hightschool; + +import android.annotation.SuppressLint; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Spinner; +import android.widget.Toast; + +import com.example.hightschool.entity.Info; +import com.uhf.api.cls.Reader; + +import org.litepal.LitePal; + +import java.util.ArrayList; +import java.util.List; + +import butterknife.BindView; +import butterknife.ButterKnife; +import butterknife.OnClick; +import cn.pda.serialport.Tools; + +public class WriteActivity extends BaseActivity implements MyDialog.DialogCilck, MyDialog1.DialogCilck1 { + + @BindView(R.id.write_year) + EditText writeYear; + @BindView(R.id.write_month) + Spinner writeMonth; + @BindView(R.id.write_jitai) + Spinner writeJitai; + @BindView(R.id.write_daiqiang) + Spinner writeDaiqiang; + @BindView(R.id.write_daikuan) + Spinner writeDaikuan; + @BindView(R.id.write_shangjiaohoudu) + Spinner writeShangjiaohoudu; + @BindView(R.id.write_xiajiaohoudu) + Spinner writeXiajiaohoudu; + @BindView(R.id.write_gaijiaojibie) + Spinner writeGaijiaojibie; + @BindView(R.id.write_juanhao) + Spinner writeJuanhao; + @BindView(R.id.write_rfidshunxu) + Spinner writeRfidshunxu; + @BindView(R.id.write_jiange1) + EditText writeJiange1; + @BindView(R.id.write_jiange2) + EditText writeJiange2; + @BindView(R.id.write_button) + Button writeButton; + @BindView(R.id.write_shengchanchangja) + Spinner writeShengchanchangja; + @BindView(R.id.write_anzhuangdidian) + Spinner writeAnzhuangdidian; + private List stringList1; + private List stringList2; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_write); + ButterKnife.bind(this); + dialog.setInfoText("写入成功"); + dialog.setDialogCilck(this); + dialog1.setInfoText("写入失败"); + dialog1.setDialogCilck(this); + //记忆 + writeYear.setText(SharedPreferencesUtils.getstring("1", "2021")); + writeMonth.setSelection(SharedPreferencesUtils.getInt("2", 0), true); + writeJitai.setSelection(SharedPreferencesUtils.getInt("3", 0), true); + writeDaiqiang.setSelection(SharedPreferencesUtils.getInt("4", 0), true); + writeDaikuan.setSelection(SharedPreferencesUtils.getInt("5", 0), true); + writeShangjiaohoudu.setSelection(SharedPreferencesUtils.getInt("6", 0), true); + writeXiajiaohoudu.setSelection(SharedPreferencesUtils.getInt("7", 0), true); + writeGaijiaojibie.setSelection(SharedPreferencesUtils.getInt("8", 0), true); + writeJuanhao.setSelection(SharedPreferencesUtils.getInt("9", 0), true); + writeRfidshunxu.setSelection(SharedPreferencesUtils.getInt("10", 0), true); + writeJiange1.setText(SharedPreferencesUtils.getstring("11-1", "0")); + writeJiange2.setText(SharedPreferencesUtils.getstring("12-1", "0")); + + + } + + @Override + protected void onResume() { + super.onResume(); + List infoList = LitePal.findAll(Info.class); + if (infoList.isEmpty()) { + startActivity(new Intent(this, InfoActivity.class)); + Toast.makeText(this, "先维护数据", Toast.LENGTH_SHORT).show(); + return; + } + stringList1 = new ArrayList<>(); + stringList2 = new ArrayList<>(); + for (Info info : infoList) { + if (info.getType().equals("生产厂家")) { + stringList1.add(info.getName()); + } else { + stringList2.add(info.getName()); + } + } + writeShengchanchangja.setAdapter(new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, stringList1)); + writeAnzhuangdidian.setAdapter(new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, stringList2)); + writeShengchanchangja.setSelection(SharedPreferencesUtils.getInt("13", 0), true); + writeAnzhuangdidian.setSelection(SharedPreferencesUtils.getInt("14", 0), true); + } + + @SuppressLint("DefaultLocale") + @OnClick(R.id.write_button) + public void onViewClicked() { + + String writeYear_text = writeYear.getText().toString().trim(); + if (writeYear_text.length() != 4) return; + writeButton.setEnabled(false); + String epc2122 = writeJiange1.getText().toString(); + String epc2324 = writeJiange2.getText().toString(); + if (epc2122.length() > 2 || epc2324.length() > 2) { + Toast.makeText(this, "", Toast.LENGTH_SHORT).show(); + return; + } + //年1、2 + String epc1a2 = writeYear_text.substring(2, 4); //1 2 + Log.e("TAG", "生产年份:" + epc1a2); + //月 3 + String month = (String) writeMonth.getSelectedItem(); + String epc3 = Integer.toHexString(Integer.parseInt(month)); + Log.e("TAG", "生产月份:" + epc3); //3 + //生产机台 4、5 + String epc4a5 = (String) writeJitai.getSelectedItem(); //4 5 + Log.e("TAG", "生产机台:" + epc4a5); + //带强 6、7 + String daiqiang = writeDaiqiang.getSelectedItem().toString(); + int data4 = dqs.indexOf(daiqiang); + String epc6a7 = String.format("%02d", data4 + 1); //6 7---4 + Log.e("TAG", "带强:" + epc6a7); + //带宽8 + String daikuan = writeDaikuan.getSelectedItem().toString(); + int data5 = dks.indexOf(daikuan); + String epc8 = String.format("%02d", data5 + 1); //8---5 + Log.e("TAG", "带宽:" + daikuan + ",代码:" + epc8); + //厚度 上 9 10 + String houdu = writeShangjiaohoudu.getSelectedItem().toString(); + int data6 = hds.indexOf(houdu); + String epc9a10 = String.format("%02d", data6 + 1); + Log.e("TAG", "厚度上:" + houdu + ",代码:" + epc9a10); + String epc1112 = "A"; //11 12 //连接符 + + //厚度 上 13 14 + String houdu_xia = writeXiajiaohoudu.getSelectedItem().toString(); + int data7 = hds.indexOf(houdu_xia); + String epc13a14 = String.format("%02d", data7 + 1); + Log.e("TAG", "厚度下 :" + houdu_xia + ",代码" + epc13a14); + //盖胶级别 15 16 + String gaijiao = writeGaijiaojibie.getSelectedItem().toString(); + int data8 = jbs.indexOf(gaijiao); + String epc1516 = String.format("%02d", data8 + 1); + Log.e("TAG", "盖胶级别 :" + gaijiao + ",代码" + epc1516); + // + String epc1718 = writeJuanhao.getSelectedItem().toString(); + Log.e("TAG", "卷号:" + epc1718); + String epc1920 = writeRfidshunxu.getSelectedItem().toString(); + Log.e("TAG", "顺序:" + epc1920); + if (epc2122.length() == 1) { + epc2122 = "0" + epc2122; + } + Log.e("TAG", "前米数:" + epc2122); + if (epc2324.length()==1) { + epc2324="0"+epc2324; + } + Log.e("TAG", "后米数:" + epc2324); + //生产厂家 + int selectedItemPosition = writeShengchanchangja.getSelectedItemPosition(); + String epc2526 = String.format("%02d", selectedItemPosition + 1); + //安装地点 + int selectedItemPosition1 = writeAnzhuangdidian.getSelectedItemPosition(); + String epc2728 = String.format("%02d", selectedItemPosition1 + 1); + + String write = epc1a2 + epc3 + epc4a5 + epc6a7 + epc8 + epc9a10 + + epc1112 + epc13a14 + epc1516 + epc1718 + epc1920 + + epc2122 + epc2324 + epc2526 + epc2728; + Log.e("TAG", "写入标签:" + write); + char i = 1; + byte[] writeepc = Tools.HexString2Bytes(write); + Reader.READER_ERR reader_err = uhfrManager.writeTagData(i, 2, writeepc, writeepc.length, accessBytes, (short) 1000); + Log.e("TAG", "write:" + reader_err); + if (reader_err.toString().equals("MT_OK_ERR")) { + mediaPlayer.start(); + dialog.show(); + //写入成功后记录 + + } else { + dialog1.show(); + } + SharedPreferencesUtils.putstring("1", writeYear_text); + SharedPreferencesUtils.putInt("2", months.indexOf(month)); + SharedPreferencesUtils.putInt("3", jts.indexOf(epc4a5)); + SharedPreferencesUtils.putInt("4", data4); + SharedPreferencesUtils.putInt("5", data5); + SharedPreferencesUtils.putInt("6", data6); + SharedPreferencesUtils.putInt("7", data7); + SharedPreferencesUtils.putInt("8", data8); + SharedPreferencesUtils.putInt("9", sxs.indexOf(epc1718)); + SharedPreferencesUtils.putInt("10", sxs.indexOf(epc1920)); + SharedPreferencesUtils.putstring("11-1", epc2122); + SharedPreferencesUtils.putstring("12-1", epc2324); + SharedPreferencesUtils.putInt("13", selectedItemPosition); + SharedPreferencesUtils.putInt("14", selectedItemPosition1); + + } + + @Override + public void OnClickListener() { + writeButton.setEnabled(true); + } + + @Override + public void onPointerCaptureChanged(boolean hasCapture) { + writeButton.setEnabled(true); + } +} diff --git a/app/src/main/java/com/example/hightschool/adapter/InfoAdape.java b/app/src/main/java/com/example/hightschool/adapter/InfoAdape.java new file mode 100644 index 0000000..06d2830 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/adapter/InfoAdape.java @@ -0,0 +1,79 @@ +package com.example.hightschool.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.example.hightschool.R; +import com.example.hightschool.entity.Info; + +import java.util.List; + +/** + * @author wanghao + * @date 2022/10/28 16:16 + */ +public class InfoAdape extends RecyclerView.Adapter { + private Context context; + private List list; + private LayoutInflater inflater; + private ItemClickInterface itemClickInterface; + + + public InfoAdape(Context context, ItemClickInterface itemClickInterface) { + this.context = context; + + this.inflater = LayoutInflater.from(context); + this.itemClickInterface = itemClickInterface; + + } + + public void setList(List list) { + this.list = list; + } + + @NonNull + @Override + public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + View view = inflater.inflate(R.layout.item_layout, parent,false); + return new MyViewHolder(view); + } + + @Override + public void onBindViewHolder(@NonNull MyViewHolder holder, int position) { + Info info=list.get(position); + holder.order.setText(String.valueOf(position+1)); + holder.name.setText(info.getName()); + holder.button.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + itemClickInterface.onItemClick(position); + } + }); + } + + @Override + public int getItemCount() { + if (list!=null) return list.size(); + return 0; + } + + public class MyViewHolder extends RecyclerView.ViewHolder { + private TextView order,name,button; + public MyViewHolder(@NonNull View itemView) { + super(itemView); + order=itemView.findViewById(R.id.item_index); + name=itemView.findViewById(R.id.item_info); + button=itemView.findViewById(R.id.item_buttom); + } + } + + public interface ItemClickInterface { + void onItemClick(int index); + } +} diff --git a/app/src/main/java/com/example/hightschool/dialog/EditTextDialog.java b/app/src/main/java/com/example/hightschool/dialog/EditTextDialog.java new file mode 100644 index 0000000..2aaa726 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/dialog/EditTextDialog.java @@ -0,0 +1,68 @@ +package com.example.hightschool.dialog; + +import android.app.Dialog; +import android.content.Context; +import android.os.Bundle; +import android.view.View; +import android.widget.EditText; + +import androidx.annotation.NonNull; + +import com.example.hightschool.R; + +import butterknife.BindView; +import butterknife.ButterKnife; +import butterknife.OnClick; + +/** + * @author wanghao + * @date 2022/11/7 16:24 + */ +public class EditTextDialog extends Dialog { + @BindView(R.id.dialog3_info) + EditText dialog3Info; + + + private DialogCall call; + + public void setCall(DialogCall call) { + this.call = call; + } + + public EditTextDialog(@NonNull Context context) { + super(context, R.style.CustomDialog); + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.dialog_edit); + ButterKnife.bind(this); + setCanceledOnTouchOutside(false); + } + + @OnClick({R.id.dialog3_button2, R.id.dialog3_button1}) + public void onClick(View view) { + switch (view.getId()) { + case R.id.dialog3_button2: + + break; + case R.id.dialog3_button1: + String s = dialog3Info.getText().toString(); + if (s.isEmpty()) return; + call.inputTextCall(s); + break; + } + dismiss(); + } + + @Override + public void show() { + super.show(); + dialog3Info.setText(null); + } + + public interface DialogCall { + void inputTextCall(String text); + } +} diff --git a/app/src/main/java/com/example/hightschool/entity/Info.java b/app/src/main/java/com/example/hightschool/entity/Info.java new file mode 100644 index 0000000..1b469a5 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/entity/Info.java @@ -0,0 +1,46 @@ +package com.example.hightschool.entity; + +import org.litepal.crud.LitePalSupport; + +/** + * @author wanghao + * @date 2022/10/27 16:54 + */ +public class Info extends LitePalSupport { + private int id; + private String name; + private String type; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + @Override + public String toString() { + return "Info{" + + "id=" + id + + ", name='" + name + '\'' + + ", type='" + type + '\'' + + '}'; + } +} diff --git a/app/src/main/java/com/example/hightschool/test/uhf_r_v1.0.jar b/app/src/main/java/com/example/hightschool/test/uhf_r_v1.0.jar new file mode 100644 index 0000000..633acd0 Binary files /dev/null and b/app/src/main/java/com/example/hightschool/test/uhf_r_v1.0.jar differ diff --git a/app/src/main/java/com/example/hightschool/zifuchuanchuliActivity.java b/app/src/main/java/com/example/hightschool/zifuchuanchuliActivity.java new file mode 100644 index 0000000..45c6226 --- /dev/null +++ b/app/src/main/java/com/example/hightschool/zifuchuanchuliActivity.java @@ -0,0 +1,110 @@ +//package com.example.hightschool; +// +//import android.os.Bundle; +//import android.util.Log; +//import android.view.KeyEvent; +//import android.widget.TextView; +//import android.widget.Toast; +// +// +//import com.uhf.api.cls.Reader; +// +//import butterknife.BindView; +//import butterknife.ButterKnife; +//import butterknife.OnClick; +//import cn.pda.serialport.Tools; +// +//public class zifuchuanchuliActivity extends BaseActivity { +// +// @BindView(R.id.chuli_epc) +// TextView chuliEpc; +// char i = 1; +// @BindView(R.id.chuli_epc1) +// TextView chuliEpc1; +// +// @Override +// protected void onCreate(Bundle savedInstanceState) { +// super.onCreate(savedInstanceState); +// setContentView(R.layout.activity_zifuchuanchuli); +// ButterKnife.bind(this); +// +// +// } +// +// @OnClick(R.id.chuli_button) +// public void onViewClicked() { +// reedepc(); +// } +// +// @Override +// public boolean onKeyDown(int keyCode, KeyEvent event) { +// Log.e("TAG", "onKeyDown:" + keyCode); +// if (keyCode == 135) { +// reedepc(); +// } else if (keyCode == 4) { +// finish(); +// } +// +// return true; +// } +// +// private void reedepc() { +// byte[] readBytes = new byte[12]; +// if (uhfrManager == null) { +// uhfrManager = MyApp.getUhfrManager(); +// } +// Reader.READER_ERR reader_err = uhfrManager.getTagData(1, 2, 6, readBytes, accessBytes, (short) 1000); +// Log.e("TAG", "san_epc:" + reader_err); +// if (reader_err.toString().equals("MT_OK_ERR")) { +// mediaPlayer.start(); +// String epc= Tools.Bytes2HexString(readBytes,readBytes.length); +//// String epc = "343230393900000000000000"; +// +// rerd_view(epc); +// } else { +// Toast.makeText(this, "读取失败", Toast.LENGTH_SHORT).show(); +// chuliEpc.setText(null); +// chuliEpc1.setText(null); +// } +// +// } +// +// private void rerd_view(String epc) { +// chuliEpc.setText(epc); +// try { +// String epcH10 = epc.substring(10, epc.length()); +// Log.e("TAG", "epcH10:" + epcH10); +// int test = Integer.parseInt(epcH10); +// if (test == 0) { +// String epc10 = epc.substring(0, 10); +// Log.e("TAG", "rerd_view:" + epc10); +// //拼接成新的规则 +// String epcNew = "5151474A50" + epc10 + "0000"; +// byte[] writeepc = Tools.HexString2Bytes(epcNew); +// Reader.READER_ERR reader_err = uhfrManager.writeTagData(i, 2, writeepc, writeepc.length, accessBytes, (short) 1000); +// Log.e("TAG", "write:" + reader_err); +// //写入判断 +// if (reader_err.toString().equals("MT_OK_ERR")) { +// mediaPlayer.start(); +// dialog1.setInfoText("写入成功"); +// dialog1.show(); +// chuliEpc1.setText(epcNew); +// } else { +// Toast.makeText(this, "写入失败", Toast.LENGTH_SHORT).show(); +// chuliEpc1.setText(null); +// } +// } else { +// dialog1.setInfoText("读取到EPC不符合规范"); +// dialog1.show(); +// chuliEpc1.setText(null); +// } +// } catch (Exception e) { +// e.printStackTrace(); +// dialog1.setInfoText("读取到EPC长度不够"); +// dialog1.show(); +// chuliEpc1.setText(null); +// } +// +// +// } +//} diff --git a/app/src/main/jniLibs/arm64-v8a/libModuleAPIJni.so b/app/src/main/jniLibs/arm64-v8a/libModuleAPIJni.so new file mode 100644 index 0000000..4072ad2 Binary files /dev/null and b/app/src/main/jniLibs/arm64-v8a/libModuleAPIJni.so differ diff --git a/app/src/main/jniLibs/arm64-v8a/libSerialPort.so b/app/src/main/jniLibs/arm64-v8a/libSerialPort.so new file mode 100644 index 0000000..18949be Binary files /dev/null and b/app/src/main/jniLibs/arm64-v8a/libSerialPort.so differ diff --git a/app/src/main/jniLibs/arm64-v8a/libdevapi.so b/app/src/main/jniLibs/arm64-v8a/libdevapi.so new file mode 100644 index 0000000..4e65b7e Binary files /dev/null and b/app/src/main/jniLibs/arm64-v8a/libdevapi.so differ diff --git a/app/src/main/jniLibs/arm64-v8a/libirdaSerialPort.so b/app/src/main/jniLibs/arm64-v8a/libirdaSerialPort.so new file mode 100644 index 0000000..8c43d80 Binary files /dev/null and b/app/src/main/jniLibs/arm64-v8a/libirdaSerialPort.so differ diff --git a/app/src/main/jniLibs/armeabi-v7a/libModuleAPIJni.so b/app/src/main/jniLibs/armeabi-v7a/libModuleAPIJni.so new file mode 100644 index 0000000..7e07755 Binary files /dev/null and b/app/src/main/jniLibs/armeabi-v7a/libModuleAPIJni.so differ diff --git a/app/src/main/jniLibs/armeabi-v7a/libSerialPort.so b/app/src/main/jniLibs/armeabi-v7a/libSerialPort.so new file mode 100644 index 0000000..d7eb1f9 Binary files /dev/null and b/app/src/main/jniLibs/armeabi-v7a/libSerialPort.so differ diff --git a/app/src/main/jniLibs/armeabi-v7a/libdevapi.so b/app/src/main/jniLibs/armeabi-v7a/libdevapi.so new file mode 100644 index 0000000..4ce4fc6 Binary files /dev/null and b/app/src/main/jniLibs/armeabi-v7a/libdevapi.so differ diff --git a/app/src/main/jniLibs/armeabi-v7a/libirdaSerialPort.so b/app/src/main/jniLibs/armeabi-v7a/libirdaSerialPort.so new file mode 100644 index 0000000..d1c5202 Binary files /dev/null and b/app/src/main/jniLibs/armeabi-v7a/libirdaSerialPort.so differ diff --git a/app/src/main/jniLibs/armeabi/libModuleAPIJni.so b/app/src/main/jniLibs/armeabi/libModuleAPIJni.so new file mode 100644 index 0000000..e837b9d Binary files /dev/null and b/app/src/main/jniLibs/armeabi/libModuleAPIJni.so differ diff --git a/app/src/main/jniLibs/armeabi/libModuleAPI_Android.so b/app/src/main/jniLibs/armeabi/libModuleAPI_Android.so new file mode 100644 index 0000000..b8c2f54 Binary files /dev/null and b/app/src/main/jniLibs/armeabi/libModuleAPI_Android.so differ diff --git a/app/src/main/jniLibs/armeabi/libSerialPort.so b/app/src/main/jniLibs/armeabi/libSerialPort.so new file mode 100644 index 0000000..dc3c956 Binary files /dev/null and b/app/src/main/jniLibs/armeabi/libSerialPort.so differ diff --git a/app/src/main/jniLibs/armeabi/libdevapi.so b/app/src/main/jniLibs/armeabi/libdevapi.so new file mode 100644 index 0000000..4ce4fc6 Binary files /dev/null and b/app/src/main/jniLibs/armeabi/libdevapi.so differ diff --git a/app/src/main/jniLibs/armeabi/libirdaSerialPort.so b/app/src/main/jniLibs/armeabi/libirdaSerialPort.so new file mode 100644 index 0000000..b8a8974 Binary files /dev/null and b/app/src/main/jniLibs/armeabi/libirdaSerialPort.so differ diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..1f6bb29 --- /dev/null +++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/app/src/main/res/drawable/button.xml b/app/src/main/res/drawable/button.xml new file mode 100644 index 0000000..1df02d9 --- /dev/null +++ b/app/src/main/res/drawable/button.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/dialog_bg.xml b/app/src/main/res/drawable/dialog_bg.xml new file mode 100644 index 0000000..de41cc6 --- /dev/null +++ b/app/src/main/res/drawable/dialog_bg.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..0d025f9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/infobg.xml b/app/src/main/res/drawable/infobg.xml new file mode 100644 index 0000000..852816e --- /dev/null +++ b/app/src/main/res/drawable/infobg.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/tablayout_bg.xml b/app/src/main/res/drawable/tablayout_bg.xml new file mode 100644 index 0000000..c5571f7 --- /dev/null +++ b/app/src/main/res/drawable/tablayout_bg.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_1.xml b/app/src/main/res/layout/activity_1.xml new file mode 100644 index 0000000..7d8e22b --- /dev/null +++ b/app/src/main/res/layout/activity_1.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_info.xml b/app/src/main/res/layout/activity_info.xml new file mode 100644 index 0000000..f7f394c --- /dev/null +++ b/app/src/main/res/layout/activity_info.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..e779794 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_reed.xml b/app/src/main/res/layout/activity_reed.xml new file mode 100644 index 0000000..17c7d4a --- /dev/null +++ b/app/src/main/res/layout/activity_reed.xml @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +