瀏覽代碼

Penambahan network security config untuk android Oreo keatas
Perubahan konfigurasi serial port untuk device terbaru (Lecom U9000)
Penambahan detail informasi tiap device yang sudah digunakan di file "DeviceInfo.md"

ilhamitubagoes 3 年之前
父節點
當前提交
0e28122e66

+ 4 - 1
app/src/main/AndroidManifest.xml

@@ -1,5 +1,6 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+    xmlns:tools="http://schemas.android.com/tools"
3 4
     package="com.fusi24.entryPermitScanner">
4 5
 
5 6
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
@@ -13,7 +14,9 @@
13 14
         android:label="@string/app_name"
14 15
         android:roundIcon="@drawable/logo_hse_autimation"
15 16
         android:supportsRtl="true"
16
-        android:theme="@style/AppTheme">
17
+        android:networkSecurityConfig="@xml/network_security_config"
18
+        android:theme="@style/AppTheme"
19
+        tools:targetApi="n">
17 20
         <activity
18 21
             android:name=".SplashScreenActivity"
19 22
             android:screenOrientation="portrait"

+ 16 - 0
app/src/main/java/com/fusi24/entryPermitScanner/config/DeviceInfo.md

@@ -0,0 +1,16 @@
1
+======Info Device=====
2
+
3
+Device info ini berfungsi untuk konfigurasi penggunaan RFID GUN (NFC Reader)
4
+(Perlu detail spesifikasi perangkat untuk V1)
5
+
6
+Device V1
7
+/dev/ttyS2
8
+/proc/gpiocontrol/set_id
9
+
10
+Device V2 (Lecom U8000)
11
+/dev/ttyS3
12
+/proc/gpiocontrol/set_sam
13
+
14
+Device V3 (Lecom U9000)
15
+/dev/ttyS3
16
+/proc/gpiocontrol/set_id

+ 1 - 1
app/src/main/java/com/fusi24/entryPermitScanner/util/PowerUtil.java

@@ -12,7 +12,7 @@ public class PowerUtil {
12 12
       if (isSerialPort2){
13 13
         localFileWriterOn = new FileWriter(new File(Constant.PATHNAME_SP2));
14 14
       } else {
15
-        localFileWriterOn = new FileWriter(new File(Constant.PATHNAME_SP3));
15
+        localFileWriterOn = new FileWriter(new File(Constant.PATHNAME_SP2));
16 16
       }
17 17
       localFileWriterOn.write(id);
18 18
       localFileWriterOn.close();

+ 5 - 0
app/src/main/res/xml/network_security_config.xml

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<network-security-config>
3
+    <base-config cleartextTrafficPermitted="true">
4
+    </base-config>
5
+</network-security-config>