diff --git a/src/sixaunyi/.gitignore b/src/sixaunyi/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/src/sixaunyi/.gitignore @@ -0,0 +1,15 @@ +*.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 +local.properties diff --git a/src/sixaunyi/.idea/.gitignore b/src/sixaunyi/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/src/sixaunyi/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/src/sixaunyi/.idea/compiler.xml b/src/sixaunyi/.idea/compiler.xml new file mode 100644 index 0000000..fb7f4a8 --- /dev/null +++ b/src/sixaunyi/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/sixaunyi/.idea/deploymentTargetDropDown.xml b/src/sixaunyi/.idea/deploymentTargetDropDown.xml new file mode 100644 index 0000000..20d74ab --- /dev/null +++ b/src/sixaunyi/.idea/deploymentTargetDropDown.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/sixaunyi/.idea/gradle.xml b/src/sixaunyi/.idea/gradle.xml new file mode 100644 index 0000000..a2d7c21 --- /dev/null +++ b/src/sixaunyi/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/src/sixaunyi/.idea/misc.xml b/src/sixaunyi/.idea/misc.xml new file mode 100644 index 0000000..cc4873f --- /dev/null +++ b/src/sixaunyi/.idea/misc.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/0/3/0336633037f72ee431c162e8d6cbc29d1cd6fa5d b/src/sixaunyi/.idea/sonarlint/issuestore/0/3/0336633037f72ee431c162e8d6cbc29d1cd6fa5d new file mode 100644 index 0000000..9fac4f7 --- /dev/null +++ b/src/sixaunyi/.idea/sonarlint/issuestore/0/3/0336633037f72ee431c162e8d6cbc29d1cd6fa5d @@ -0,0 +1,5 @@ + +C +java:S1604"(Make this anonymous inner class a lambda( +P +java:S1161":Add the "@Override" annotation above this method signature( \ No newline at end of file diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/0/5/05efc8b1657769a27696d478ded1e95f38737233 b/src/sixaunyi/.idea/sonarlint/issuestore/0/5/05efc8b1657769a27696d478ded1e95f38737233 new file mode 100644 index 0000000..e69de29 diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/1/2/12963d86ac5c2888cc2a9ae459de5665bc06b01f b/src/sixaunyi/.idea/sonarlint/issuestore/1/2/12963d86ac5c2888cc2a9ae459de5665bc06b01f new file mode 100644 index 0000000..5d32c84 --- /dev/null +++ b/src/sixaunyi/.idea/sonarlint/issuestore/1/2/12963d86ac5c2888cc2a9ae459de5665bc06b01f @@ -0,0 +1,5 @@ + +> +java:S1604"(Make this anonymous inner class a lambda(ʆ +P +java:S1161":Add the "@Override" annotation above this method signature( \ No newline at end of file diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/2/a/2afbb999f001938c88fa43fc2ef52abf0f8213e4 b/src/sixaunyi/.idea/sonarlint/issuestore/2/a/2afbb999f001938c88fa43fc2ef52abf0f8213e4 new file mode 100644 index 0000000..e69de29 diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/7/1/71fd1993763df2214bbdad8cfee650733993fe44 b/src/sixaunyi/.idea/sonarlint/issuestore/7/1/71fd1993763df2214bbdad8cfee650733993fe44 new file mode 100644 index 0000000..4e64334 --- /dev/null +++ b/src/sixaunyi/.idea/sonarlint/issuestore/7/1/71fd1993763df2214bbdad8cfee650733993fe44 @@ -0,0 +1,30 @@ + +C +java:S1604:"(Make this anonymous inner class a lambda( += +java:S1604A"(Make this anonymous inner class a lambda(ډ +o java:S115!"ZRename this constant name to match the regular expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'.( +m +java:S14501"RRemove the "btn" field and declare it as a local variable in the relevant methods.(ȧ +m +java:S1450/"RRemove the "trs" field and declare it as a local variable in the relevant methods.(ܔ +` +java:S1124 "EReorder the modifiers to comply with the Java Language Specification.(Ժ +[ +java:S1124!"EReorder the modifiers to comply with the Java Language Specification.( +[ +java:S1124""EReorder the modifiers to comply with the Java Language Specification.(ß +[ +java:S1124#"EReorder the modifiers to comply with the Java Language Specification.(Ӿ +C +java:S1185\"(Remove this method to simply inherit it.( +V java:S125o"Use isEmpty() to check whether the collection is empty or not.(8㡌0 +\ +java:S1117"9Rename "query" which hides the field declared at line 67.(8㡌0 +^ java:S125" +java:S10689"(Remove this unused "city" private field.( +? +java:S1068C")Remove this unused "query" private field.( +H +java:S1068E"-Remove this unused "poiSearch" private field.( +B +java:S1068G",Remove this unused "cityCode" private field.( \ No newline at end of file diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/7/e/7e2dc811cc280952b5bbbfb02aa0e4fa16a75d7c b/src/sixaunyi/.idea/sonarlint/issuestore/7/e/7e2dc811cc280952b5bbbfb02aa0e4fa16a75d7c new file mode 100644 index 0000000..e69de29 diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/8/9/892f839083a73d776402535dde27e522288853c9 b/src/sixaunyi/.idea/sonarlint/issuestore/8/9/892f839083a73d776402535dde27e522288853c9 new file mode 100644 index 0000000..e69de29 diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/8/c/8c55c3ccc257e5907959013f99656e4c8ec3903e b/src/sixaunyi/.idea/sonarlint/issuestore/8/c/8c55c3ccc257e5907959013f99656e4c8ec3903e new file mode 100644 index 0000000..e69de29 diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/9/e/9e08934d811afe28fbc77aaa3c0d747b94348db9 b/src/sixaunyi/.idea/sonarlint/issuestore/9/e/9e08934d811afe28fbc77aaa3c0d747b94348db9 new file mode 100644 index 0000000..e69de29 diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/f/4/f4a01d6a4fcb971362ec00a83903fd3902f52164 b/src/sixaunyi/.idea/sonarlint/issuestore/f/4/f4a01d6a4fcb971362ec00a83903fd3902f52164 new file mode 100644 index 0000000..e69de29 diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/f/b/fbe448ebfc3eb2d4e308f6b8b043666f5b57235e b/src/sixaunyi/.idea/sonarlint/issuestore/f/b/fbe448ebfc3eb2d4e308f6b8b043666f5b57235e new file mode 100644 index 0000000..e69de29 diff --git a/src/sixaunyi/.idea/sonarlint/issuestore/index.pb b/src/sixaunyi/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 0000000..3ca498c --- /dev/null +++ b/src/sixaunyi/.idea/sonarlint/issuestore/index.pb @@ -0,0 +1,25 @@ + +z +Japp/src/androidTest/java/com/example/sixaunyi/ExampleInstrumentedTest.java,7\e\7e2dc811cc280952b5bbbfb02aa0e4fa16a75d7c +F +app/proguard-rules.pro,9\e\9e08934d811afe28fbc77aaa3c0d747b94348db9 +X +(gradle/wrapper/gradle-wrapper.properties,f\b\fbe448ebfc3eb2d4e308f6b8b043666f5b57235e +A +gradle.properties,2\a\2afbb999f001938c88fa43fc2ef52abf0f8213e4 +k +;app/src/test/java/com/example/sixaunyi/ExampleUnitTest.java,8\9\892f839083a73d776402535dde27e522288853c9 +i +9app/src/main/java/com/example/sixaunyi/FirstFragment.java,0\3\0336633037f72ee431c162e8d6cbc29d1cd6fa5d +j +:app/src/main/java/com/example/sixaunyi/SecondFragment.java,1\2\12963d86ac5c2888cc2a9ae459de5665bc06b01f +? +settings.gradle,0\5\05efc8b1657769a27696d478ded1e95f38737233 +i +9app/src/main/java/com/example/sixaunyi/VideoActivity.java,7\1\71fd1993763df2214bbdad8cfee650733993fe44 +P + app/src/main/AndroidManifest.xml,8\c\8c55c3ccc257e5907959013f99656e4c8ec3903e +@ +app/build.gradle,f\4\f4a01d6a4fcb971362ec00a83903fd3902f52164 +h +8app/src/main/java/com/example/sixaunyi/MainActivity.java,7\c\7c120b7216f76ce98d1573d90803ab36f481640c \ No newline at end of file diff --git a/src/sixaunyi/app/.gitignore b/src/sixaunyi/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/src/sixaunyi/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/src/sixaunyi/app/build.gradle b/src/sixaunyi/app/build.gradle new file mode 100644 index 0000000..8d7d5e6 --- /dev/null +++ b/src/sixaunyi/app/build.gradle @@ -0,0 +1,57 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdk 32 + + defaultConfig { + applicationId "com.example.sixaunyi" + minSdk 22 + targetSdk 32 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + buildFeatures { + viewBinding true + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'com.google.android.material:material:1.4.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation 'androidx.navigation:navigation-fragment:2.3.5' + implementation 'androidx.navigation:navigation-ui:2.3.5' + implementation 'com.google.android.gms:play-services-maps:17.0.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + implementation fileTree(dir: 'libs', include: ['*.jar']) + //Google推荐的EasyPermission库 + implementation 'pub.devrel:easypermissions:3.0.0' + //Material库 + implementation 'com.google.android.material:material:1.6.1' + + + //定位功能 + /*implementation 'com.amap.api:location:latest.integration' + //搜索功能 + implementation 'com.amap.api:search:latest.integration'*/ + + +} \ No newline at end of file diff --git a/src/sixaunyi/app/libs/AMap3DMap_9.6.0_AMapSearch_9.5.0_AMapLocation_6.2.0_20230116.jar b/src/sixaunyi/app/libs/AMap3DMap_9.6.0_AMapSearch_9.5.0_AMapLocation_6.2.0_20230116.jar new file mode 100644 index 0000000..88f5bd5 Binary files /dev/null and b/src/sixaunyi/app/libs/AMap3DMap_9.6.0_AMapSearch_9.5.0_AMapLocation_6.2.0_20230116.jar differ diff --git a/src/sixaunyi/app/libs/arm64-v8a/libAMapSDK_MAP_v9_6_0.so b/src/sixaunyi/app/libs/arm64-v8a/libAMapSDK_MAP_v9_6_0.so new file mode 100644 index 0000000..55afb6b Binary files /dev/null and b/src/sixaunyi/app/libs/arm64-v8a/libAMapSDK_MAP_v9_6_0.so differ diff --git a/src/sixaunyi/app/libs/armeabi-v7a/libAMapSDK_MAP_v9_6_0.so b/src/sixaunyi/app/libs/armeabi-v7a/libAMapSDK_MAP_v9_6_0.so new file mode 100644 index 0000000..de0b88d Binary files /dev/null and b/src/sixaunyi/app/libs/armeabi-v7a/libAMapSDK_MAP_v9_6_0.so differ diff --git a/src/sixaunyi/app/libs/armeabi/libAMapSDK_MAP_v9_6_0.so b/src/sixaunyi/app/libs/armeabi/libAMapSDK_MAP_v9_6_0.so new file mode 100644 index 0000000..de0b88d Binary files /dev/null and b/src/sixaunyi/app/libs/armeabi/libAMapSDK_MAP_v9_6_0.so differ diff --git a/src/sixaunyi/app/libs/x86_64/libAMapSDK_MAP_v9_6_0.so b/src/sixaunyi/app/libs/x86_64/libAMapSDK_MAP_v9_6_0.so new file mode 100644 index 0000000..7283219 Binary files /dev/null and b/src/sixaunyi/app/libs/x86_64/libAMapSDK_MAP_v9_6_0.so differ diff --git a/src/sixaunyi/app/proguard-rules.pro b/src/sixaunyi/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/src/sixaunyi/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 \ No newline at end of file diff --git a/src/sixaunyi/app/release/app-release.apk b/src/sixaunyi/app/release/app-release.apk new file mode 100644 index 0000000..cc0d509 Binary files /dev/null and b/src/sixaunyi/app/release/app-release.apk differ diff --git a/src/sixaunyi/app/release/output-metadata.json b/src/sixaunyi/app/release/output-metadata.json new file mode 100644 index 0000000..1f9a9ed --- /dev/null +++ b/src/sixaunyi/app/release/output-metadata.json @@ -0,0 +1,20 @@ +{ + "version": 3, + "artifactType": { + "type": "APK", + "kind": "Directory" + }, + "applicationId": "com.example.sixaunyi", + "variantName": "release", + "elements": [ + { + "type": "SINGLE", + "filters": [], + "attributes": [], + "versionCode": 1, + "versionName": "1.0", + "outputFile": "app-release.apk" + } + ], + "elementType": "File" +} \ No newline at end of file diff --git a/src/sixaunyi/app/src/androidTest/java/com/example/sixaunyi/ExampleInstrumentedTest.java b/src/sixaunyi/app/src/androidTest/java/com/example/sixaunyi/ExampleInstrumentedTest.java new file mode 100644 index 0000000..a75e967 --- /dev/null +++ b/src/sixaunyi/app/src/androidTest/java/com/example/sixaunyi/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.sixaunyi; + +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.sixaunyi", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/src/sixaunyi/app/src/main/AndroidManifest.xml b/src/sixaunyi/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..9c3a353 --- /dev/null +++ b/src/sixaunyi/app/src/main/AndroidManifest.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/sixaunyi/app/src/main/java/com/example/sixaunyi/DetectActivity.java b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/DetectActivity.java new file mode 100644 index 0000000..14bc149 --- /dev/null +++ b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/DetectActivity.java @@ -0,0 +1,221 @@ +package com.example.sixaunyi; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; + +import android.content.Intent; +import android.graphics.Color; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.TextView; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.net.Socket; +import java.util.ArrayList; + +public class DetectActivity extends AppCompatActivity { + + /*接收发送定义的常量*/ + private String mIp= "192.168.0.11"; //这里是NodeMCU的IP Address,我们可以通过打开Arduino的串口监视器获取IP Address + private int mPort = 80; //WiFiServer server(80);建立网络服务器对象,监听端口(80)这里的80是自定义的,只要与Android中的socket一致就好。 + private SendThread sendthread; + String receive_Msg; + String l; + String total0,total1,total2,total3; + private Button button0; + public TextView TV_show; + private DataHandler mHandler = new DataHandler(); + + /*****************************/ + + @Override + protected void onCreate(Bundle savedInstanceState) { + //onCreate必做事情:继承父类super.onCreate;设置当前试图:setContentView + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_detect); + TV_show = findViewById(R.id.show); + + + /***************连接*****************/ + sendthread = new SendThread(mIp, mPort, mHandler); + create_Thread(); + new Thread().start(); + /**********************************/ + } + /*接收线程*******************************************************************************/ + /** + * 开启socket连接线程 + */ + void create_Thread(){ + new Thread(sendthread).start();//创建一个新线程 + } + + class DataHandler extends Handler { + @Override + public void handleMessage(Message msg) + { + super.handleMessage(msg); + if (msg.what == 0x00) { + Log.i("mr_收到的数据: ", msg.obj.toString()); + receive_Msg = msg.obj.toString(); + if(receive_Msg.indexOf("Humidity:")!=-1) { + String[] strArray = receive_Msg.split(" "); //处理接受到的数据并将他们显示在TextView中 + TV_show.setText(strArray[3]); + } + } + } + } + + class SendThread implements Runnable { + + private String ip; + private int port; + BufferedReader in; + PrintWriter out; //打印流 + Handler mainHandler; + Socket s; + private String receiveMsg; + + ArrayList list = new ArrayList(); + + public SendThread(String ip,int port, Handler mainHandler) { //IP,端口,数据 + this.ip = ip; + this.port=port; + this.mainHandler = mainHandler; + } + + /** + * 套接字的打开 + */ + void open(){ + try { + s = new Socket(ip, port); + //in收单片机发的数据 + in = new BufferedReader(new InputStreamReader(s.getInputStream())); + out = new PrintWriter(new BufferedWriter(new OutputStreamWriter( + s.getOutputStream())), true); + } catch (IOException e) { + e.printStackTrace(); + + } + } + + /** + * 套接字的关闭 + */ + void close(){ + try { + s.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public void run() { + + //创建套接字 + open(); + + //BufferedReader + Thread thread = new Thread(new Runnable() { + @Override + public void run() { + while (true) { + try { + Thread.sleep(200); + close(); + open(); + } catch (InterruptedException e1) { + e1.printStackTrace(); + } + if (!s.isClosed()) { + if (s.isConnected()) { + if (!s.isInputShutdown()) { + try { + Log.i("mr", "等待接收信息"); + Message msg=mainHandler.obtainMessage(); + char[] chars = new char[1024]; //byte[] bys = new byte[1024]; + int len = 0; //int len = 0; + while((len = in.read(chars)) != -1){ + receiveMsg = new String(chars, 0, len); + msg.what=0x00; + msg.obj=receiveMsg; + mainHandler.sendMessage(msg); + } + } catch (IOException e) { + Log.i("mr", e.getMessage()); + try { + s.shutdownInput(); + s.shutdownOutput(); + s.close(); + } catch (IOException e1) { + e1.printStackTrace(); + } + e.printStackTrace(); + } + } + } + } + } + } + + }); + thread.start(); + + while (true) { + + //连接中 + if (!s.isClosed()&&s.isConnected()&&!s.isInputShutdown()) { + + // 如果消息集合有东西,并且发送线程在工作。 + if (list.size() > 0 && !s.isOutputShutdown()) { + out.println(list.get(0)); + list.remove(0); + } + + Message msg=mainHandler.obtainMessage(); + msg.what=0x01; + mainHandler.sendMessage(msg); + } else { + //连接中断了 + Log.i("mr", "连接断开了"); + Message msg=mainHandler.obtainMessage(); + msg.what=0x02; + mainHandler.sendMessage(msg); + } + try { + Thread.sleep(200); + } catch (InterruptedException e) { + try { + out.close(); + in.close(); + s.close(); + } catch (IOException e1) { + e1.printStackTrace(); + } + e.printStackTrace(); + } + } + + } + + public void send(String msg) { + System.out.println("msg的值为: " + msg); + list.add(msg); + } + + } + +} \ No newline at end of file diff --git a/src/sixaunyi/app/src/main/java/com/example/sixaunyi/FirstFragment.java b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/FirstFragment.java new file mode 100644 index 0000000..39bc90a --- /dev/null +++ b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/FirstFragment.java @@ -0,0 +1,46 @@ +package com.example.sixaunyi; + +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.navigation.fragment.NavHostFragment; +import com.example.sixaunyi.databinding.FragmentFirstBinding; + +public class FirstFragment extends Fragment { + +private FragmentFirstBinding binding; + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState + ) { + + binding = FragmentFirstBinding.inflate(inflater, container, false); + return binding.getRoot(); + + } + + public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + + binding.buttonFirst.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + NavHostFragment.findNavController(FirstFragment.this) + .navigate(R.id.action_FirstFragment_to_SecondFragment); + } + }); + } + +@Override + public void onDestroyView() { + super.onDestroyView(); + binding = null; + } + +} \ No newline at end of file diff --git a/src/sixaunyi/app/src/main/java/com/example/sixaunyi/MainActivity.java b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/MainActivity.java new file mode 100644 index 0000000..68caf0d --- /dev/null +++ b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/MainActivity.java @@ -0,0 +1,395 @@ +package com.example.sixaunyi; + +import static androidx.constraintlayout.motion.utils.Oscillator.TAG; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; + +import android.Manifest; +import android.graphics.BitmapFactory; +import android.nfc.Tag; +import android.os.Build; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.TextView; +import android.widget.Toast; + +import com.amap.api.location.AMapLocation; +import com.amap.api.location.AMapLocationClient; +import com.amap.api.location.AMapLocationClientOption; +import com.amap.api.location.AMapLocationListener; +import com.amap.api.maps.AMap; +import com.amap.api.maps.LocationSource; +import com.amap.api.maps.MapView; +import com.amap.api.maps.model.BitmapDescriptorFactory; +import com.amap.api.maps.model.LatLng; +import com.amap.api.maps.model.Marker; +import com.amap.api.maps.model.MarkerOptions; +import com.amap.api.services.core.AMapException; +import com.amap.api.services.core.LatLonPoint; +import com.amap.api.services.core.PoiItem; +import com.amap.api.services.geocoder.GeocodeResult; +import com.amap.api.services.geocoder.GeocodeSearch; +import com.amap.api.services.geocoder.RegeocodeAddress; +import com.amap.api.services.geocoder.RegeocodeQuery; +import com.amap.api.services.geocoder.RegeocodeResult; +import com.amap.api.services.poisearch.PoiResult; +import com.amap.api.services.poisearch.PoiSearch; +import com.google.android.material.floatingactionbutton.FloatingActionButton; + +import java.util.ArrayList; +import java.util.List; + +import pub.devrel.easypermissions.AfterPermissionGranted; +import pub.devrel.easypermissions.EasyPermissions; + +public class MainActivity extends AppCompatActivity implements AMapLocationListener, LocationSource, + AMap.OnMapLongClickListener, GeocodeSearch.OnGeocodeSearchListener { + + //请求权限码 + private static final int REQUEST_PERMISSIONS = 9527; + //声明AMapLocationClient类对象 + public AMapLocationClient mLocationClient = null; + //声明AMapLocationClientOption对象 + public AMapLocationClientOption mLocationOption = null; + private MapView mapView = null; + private String city; + //地图控制器*********非常重要!!!!!! + private AMap aMap = null; + //位置更改监听 + private LocationSource.OnLocationChangedListener mListener; + //地理编码搜索 + private GeocodeSearch geocodeSearch; + //解析成功标识码 + private static final int PARSE_SUCCESS_CODE = 1000; + //POI查询对象 + private PoiSearch.Query query; + //POI搜索对象 + private PoiSearch poiSearch; + //城市码 + private String cityCode = null; + //浮动按钮 + private FloatingActionButton fabPOI; + //浮动按钮 清空地图标点 + private FloatingActionButton ClearMarker_btn; + //标点列表 + private List markerList = new ArrayList<>(); + //标识参数类 + private MarkerOptions markerOption = new MarkerOptions(); + + + + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + fabPOI = findViewById(R.id.fab_poi); + ClearMarker_btn = findViewById(R.id.clearMarker_btn); + //tvContent = findViewById(R.id.tv_content); + /*初始化定位,需要在检查版本之前 + *因为配置好之后才能启动定位,否则会报错 + */ + initLocation(); + //初始化地图 + initMap(savedInstanceState); + //检查安卓版本 + checkingAndroidVersion(); + } + /** + * 检查Android版本 + */ + private void checkingAndroidVersion() { + //Android6.0及以上先获取权限再定位 + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){ + requestPermission(); + } + //Android6.0以下直接定位 + else { + //直接定位 + mLocationClient.startLocation(); + } + } + /** + * 动态请求权限 + */ + @AfterPermissionGranted(REQUEST_PERMISSIONS) + private void requestPermission() { + String[] permissions = { + Manifest.permission.ACCESS_COARSE_LOCATION, + Manifest.permission.ACCESS_FINE_LOCATION, + Manifest.permission.READ_PHONE_STATE, + Manifest.permission.WRITE_EXTERNAL_STORAGE + }; + + if (EasyPermissions.hasPermissions(this, permissions)) { + //有权限 + //****** + Log.d(TAG, "已获得权限,可以定位啦!"); + showMsg("已获得权限,可以定位啦!"); + //开始定位 + mLocationClient.startLocation(); + } else { + //false 无权限 + EasyPermissions.requestPermissions(this, "需要权限", REQUEST_PERMISSIONS, permissions); + } + } + //提示框显示文本 + private void showMsg(String msg) { + Toast.makeText(this, msg, Toast.LENGTH_SHORT).show(); + } + /** + * 请求权限结果 + * @param requestCode + * @param permissions + * @param grantResults + */ + @Override + public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { + super.onRequestPermissionsResult(requestCode, permissions, grantResults); + //设置请求到的权限结果 + EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this); + } + + /******** 初始化定位 *******/ + private void initLocation() { + //初始化定位 + try { + mLocationClient = new AMapLocationClient(getApplicationContext()); + } catch (Exception e) { + e.printStackTrace(); + } + if (mLocationClient != null) { + //设置定位回调监听 + mLocationClient.setLocationListener(this); + //初始化AMapLocationClientOption对象 + mLocationOption = new AMapLocationClientOption(); + //设置定位模式为AMapLocationMode.Hight_Accuracy,高精度模式。 + mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy); + //获取最近3s内精度最高的一次定位结果: + //设置setOnceLocationLatest(boolean b)接口为true,启动定位时SDK会返回最近3s内精度最高的一次定位结果。如果设置其为true,setOnceLocation(boolean b)接口也会被设置为true,反之不会,默认为false。 + mLocationOption.setOnceLocationLatest(true); + //设置是否返回地址信息(默认返回地址信息) + mLocationOption.setNeedAddress(true); + //设置定位请求超时时间,单位是毫秒,默认30000毫秒,建议超时时间不要低于8000毫秒。 + mLocationOption.setHttpTimeOut(20000); + //关闭缓存机制,高精度定位会产生缓存。 + mLocationOption.setLocationCacheEnable(false); + //给定位客户端对象设置定位参数 + mLocationClient.setLocationOption(mLocationOption); + } + } + /** + * 初始化地图 + * @param savedInstanceState + */ + private void initMap(Bundle savedInstanceState) { + //因为mapView为null,所以要加上这个括号,不可常规的mapView.findViewById + mapView = (MapView) findViewById(R.id.map_view); + //在activity执行onCreate时执行mMapView.onCreate(savedInstanceState),创建地图 + mapView.onCreate(savedInstanceState); + //初始化地图控制器对象 + aMap = mapView.getMap(); + // 设置定位监听 + aMap.setLocationSource(this); + // 设置为true表示显示定位层并可触发定位,false表示隐藏定位层并不可触发定位,默认是false + aMap.setMyLocationEnabled(true); + //开启室内地图 + //aMap.showIndoorMap(true); + //设置地图长按事件 + aMap.setOnMapLongClickListener(this); + //构造 GeocodeSearch 对象 + try { + geocodeSearch = new GeocodeSearch(this); + } catch (AMapException e) { + e.printStackTrace(); + } + //设置监听 + geocodeSearch.setOnGeocodeSearchListener(this); + } + + /** + * 激活定位 + */ + @Override + public void activate(OnLocationChangedListener onLocationChangedListener) { + mListener = onLocationChangedListener; + if (mLocationClient == null) { + mLocationClient.startLocation();//启动定位 + } + } + /** + * 停止定位 + */ + @Override + public void deactivate() { + mListener = null; + if (mLocationClient != null) { + mLocationClient.stopLocation(); + mLocationClient.onDestroy(); + } + mLocationClient = null; + } + + + @Override + public void onLocationChanged(AMapLocation aMapLocation) { + if (aMapLocation != null) { + //定位成功 + if (aMapLocation.getErrorCode() == 0) { + //地址 + String address = aMapLocation.getAddress(); + //城市赋值 + city = aMapLocation.getCity(); + //获取纬度 + double latitude = aMapLocation.getLatitude(); + //获取经度 + double longitude = aMapLocation.getLongitude(); + + Log.d("MainActivity", aMapLocation.getCity()); + showMsg(address); + //停止定位后,本地定位服务并不会被销毁 + mLocationClient.stopLocation(); + if (mListener != null) { + // 显示系统图标 + mListener.onLocationChanged(aMapLocation); + } + //显示浮动按钮 + fabPOI.show(); + //赋值 + cityCode = aMapLocation.getCityCode(); + } + else { + //定位失败时,可通过ErrCode(错误码)信息来确定失败的原因,errInfo是错误信息,详见错误码表。 + Log.e("AmapError", "location Error, ErrCode:" + + aMapLocation.getErrorCode() + ", errInfo:" + + aMapLocation.getErrorInfo()); + } + } + } + /***********************Activity相关函数,其中添加了保证mapView与activity同步相关函数******************/ + @Override + protected void onResume() { + super.onResume(); + //在activity执行onResume时执行mMapView.onResume (),重新绘制加载地图 + mapView.onResume(); + } + @Override + protected void onPause() { + super.onPause(); + //在activity执行onPause时执行mMapView.onPause (),暂停地图的绘制 + mapView.onPause(); + } + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + //在activity执行onSaveInstanceState时执行mMapView.onSaveInstanceState (outState),保存地图当前的状态 + mapView.onSaveInstanceState(outState); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + //销毁定位客户端,同时销毁本地定位服务。 + if (mLocationClient != null) { + mLocationClient.onDestroy(); + } + //在activity执行onDestroy时执行mMapView.onDestroy(),销毁地图 + mapView.onDestroy(); + } + /******************************************************************/ + /* * * 长按地图响应函数 * * */ + //LatLng 为高德地图包自带的存储坐标对象 + @Override + public void onMapLongClick(LatLng latLng) { + showMsg("长按了地图,经度:"+latLng.longitude+",纬度:"+latLng.latitude); + //坐标转地址 + latlonToAddress(latLng); + //添加标点 + addMarker(latLng); + + } + + /** + * 添加地图标点 + * @param latLng + */ + private void addMarker(LatLng latLng) { + //显示浮动按钮 + ClearMarker_btn.show(); + //添加标点 + Marker marker = aMap.addMarker(markerOption + .position(latLng) + //标点图标 + .icon(BitmapDescriptorFactory. + fromBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.img))) + //备注 + .snippet("路径点") + + ); + markerList.add(marker); + } + /** + * 清空地图Marker + * @param view + */ + public void clearAllMarker(View view) { + if (markerList != null && markerList.size()>0){ + for (Marker markerItem : markerList) { + markerItem.remove(); + } + } + ClearMarker_btn.hide(); + } + + + /* * * 通过坐标获取地址 * * * + * + * @param latLng + */ + private void latlonToAddress(LatLng latLng) { + //位置点 通过经纬度进行构建 + LatLonPoint latLonPoint = new LatLonPoint(latLng.latitude, latLng.longitude); + //逆编码查询 第一个参数表示一个Latlng,第二参数表示范围多少米,第三个参数表示是火系坐标系还是GPS原生坐标系 + RegeocodeQuery query = new RegeocodeQuery(latLonPoint, 20, GeocodeSearch.AMAP); + //异步获取地址信息 + geocodeSearch.getFromLocationAsyn(query); + } + /*****************************坐标转地址**************************** + * @param regeocodeResult + * @param rCode + */ + @Override + public void onRegeocodeSearched(RegeocodeResult regeocodeResult, int rCode) { + if(rCode == PARSE_SUCCESS_CODE){ + RegeocodeAddress regeocodeAddress = regeocodeResult.getRegeocodeAddress(); + //显示解析后的地址 + showMsg("地址:"+regeocodeAddress.getFormatAddress()); + }else { + showMsg("获取地址失败"); + } + } + + @Override + public void onGeocodeSearched(GeocodeResult geocodeResult, int i) { + + } +/* + @Override + public void onPoiSearched(PoiResult poiResult, int i) { + //解析result获取POI信息 + + //获取POI组数列表 + ArrayList poiItems = poiResult.getPois(); + for (PoiItem poiItem : poiItems) { + Log.d("MainActivity", " Title:" + poiItem.getTitle() + " Snippet:" + poiItem.getSnippet()); + } + }*/ + /* + @Override + public void (PoiItem poiItem, int i) { + + }*/ +} \ No newline at end of file diff --git a/src/sixaunyi/app/src/main/java/com/example/sixaunyi/MapApplication.java b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/MapApplication.java new file mode 100644 index 0000000..8d60cb8 --- /dev/null +++ b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/MapApplication.java @@ -0,0 +1,27 @@ +package com.example.sixaunyi; + + +import android.app.Application; +import android.content.Context; + +import com.amap.api.location.AMapLocationClient; +import com.amap.api.maps.MapsInitializer; +import com.amap.api.services.core.ServiceSettings; + +public class MapApplication extends Application { + + @Override + public void onCreate() { + super.onCreate(); + Context context = this; + //定位隐私政策同意 + AMapLocationClient.updatePrivacyShow(context,true,true); + AMapLocationClient.updatePrivacyAgree(context,true); + //地图隐私政策同意 + MapsInitializer.updatePrivacyShow(context,true,true); + MapsInitializer.updatePrivacyAgree(context,true); + //搜索隐私政策同意 + ServiceSettings.updatePrivacyShow(context,true,true); + ServiceSettings.updatePrivacyAgree(context,true); + } +} diff --git a/src/sixaunyi/app/src/main/java/com/example/sixaunyi/SecondFragment.java b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/SecondFragment.java new file mode 100644 index 0000000..9e2740a --- /dev/null +++ b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/SecondFragment.java @@ -0,0 +1,46 @@ +package com.example.sixaunyi; + +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.navigation.fragment.NavHostFragment; +import com.example.sixaunyi.databinding.FragmentSecondBinding; + +public class SecondFragment extends Fragment { + +private FragmentSecondBinding binding; + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState + ) { + + binding = FragmentSecondBinding.inflate(inflater, container, false); + return binding.getRoot(); + + } + + public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + + binding.buttonSecond.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + NavHostFragment.findNavController(SecondFragment.this) + .navigate(R.id.action_SecondFragment_to_FirstFragment); + } + }); + } + +@Override + public void onDestroyView() { + super.onDestroyView(); + binding = null; + } + +} \ No newline at end of file diff --git a/src/sixaunyi/app/src/main/java/com/example/sixaunyi/VideoActivity.java b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/VideoActivity.java new file mode 100644 index 0000000..22c2218 --- /dev/null +++ b/src/sixaunyi/app/src/main/java/com/example/sixaunyi/VideoActivity.java @@ -0,0 +1,168 @@ +package com.example.sixaunyi; + +import static androidx.constraintlayout.motion.utils.Oscillator.TAG; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.TextView; +import android.widget.Toast; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.net.DatagramPacket; +import java.net.DatagramSocket; +import java.net.InetAddress; + +import android.os.Bundle; + +public class VideoActivity extends AppCompatActivity { + + + private final static String SEND_IP = "192.168.43.206"; //填写接收方IP + private final static String Fasong_mudi_IP = "192.168.43.41"; + private final static int SEND_PORT = 8888; //发送端口号 + private final static int RECEIVE_PORT = 9999; //接收端口号 + + private boolean listenStatus = true; //接收线程的循环标识 + private byte[] buf; + Bitmap bp; + + private DatagramSocket receiveSocket; + private DatagramSocket sendSocket; + private DatagramSocket reveSocket; + private InetAddress serverAddr; + private SendHandler sendHandler = new SendHandler(); + private ReceiveHandler receiveHandler = new ReceiveHandler(); + private Button trs; + private ImageView imgShow; + private Button btn; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_video); + imgShow = findViewById(R.id.img_show); + btn = findViewById(R.id.btn_send); + trs = findViewById(R.id.transfer_to_detect); + btn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + new UdpSendThread().start(); + new UdpReceiveThread().start();//会导致闪退 + } + }); + trs.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Intent intent = new Intent(VideoActivity.this, DetectActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); + startActivity(intent); + } + }); + } + + + class ReceiveHandler extends Handler{ + @Override + public void handleMessage(Message msg) { + super.handleMessage(msg); + imgShow.setImageBitmap(bp); + + + } + } + + + + + + class SendHandler extends Handler { + @Override + public void handleMessage(Message msg) { + super.handleMessage(msg); + } + } + + + + /* + * UDP数据接受线程 + * */ + public class UdpReceiveThread extends Thread + { + @Override + public void run() + { + try + { + reveSocket = new DatagramSocket(RECEIVE_PORT); + serverAddr = InetAddress.getByName(Fasong_mudi_IP); + //ByteArrayOutputStream out = new ByteArrayOutputStream(); + while(listenStatus) + { + byte[] inBuf= new byte[1024*1024]; + DatagramPacket inPacket=new DatagramPacket(inBuf,inBuf.length); + //out.write(inPacket.getData()); + reveSocket.receive(inPacket); + if(!inPacket.getAddress().equals(serverAddr)){ + throw new IOException("未知名的报文"); + } + + ByteArrayInputStream in = new ByteArrayInputStream(inPacket.getData()); + receiveHandler.sendEmptyMessage(1); + bp = BitmapFactory.decodeStream(in); + + + } + + + } catch (Exception e) + { + e.printStackTrace(); + }finally { + reveSocket.close(); + } + } + } + + /* + * UDP数据发送线程 + * */ + public class UdpSendThread extends Thread { + @Override + public void run() { + try { + buf ="test".getBytes(); + + // 创建DatagramSocket对象,使用端口8888 + sendSocket = new DatagramSocket(8888); + + serverAddr = InetAddress.getByName(Fasong_mudi_IP); + + DatagramPacket outPacket = new DatagramPacket(buf, buf.length, serverAddr, SEND_PORT); + sendSocket.send(outPacket); + + sendSocket.close(); + sendHandler.sendEmptyMessage(1); + + + } catch (Exception e) { + e.printStackTrace(); + } + } + } + +} + + diff --git a/src/sixaunyi/app/src/main/jniLibs/arm64-v8a/libAMapSDK_MAP_v9_6_0.so b/src/sixaunyi/app/src/main/jniLibs/arm64-v8a/libAMapSDK_MAP_v9_6_0.so new file mode 100644 index 0000000..55afb6b Binary files /dev/null and b/src/sixaunyi/app/src/main/jniLibs/arm64-v8a/libAMapSDK_MAP_v9_6_0.so differ diff --git a/src/sixaunyi/app/src/main/jniLibs/armeabi-v7a/libAMapSDK_MAP_v9_6_0.so b/src/sixaunyi/app/src/main/jniLibs/armeabi-v7a/libAMapSDK_MAP_v9_6_0.so new file mode 100644 index 0000000..de0b88d Binary files /dev/null and b/src/sixaunyi/app/src/main/jniLibs/armeabi-v7a/libAMapSDK_MAP_v9_6_0.so differ diff --git a/src/sixaunyi/app/src/main/jniLibs/armeabi/libAMapSDK_MAP_v9_6_0.so b/src/sixaunyi/app/src/main/jniLibs/armeabi/libAMapSDK_MAP_v9_6_0.so new file mode 100644 index 0000000..de0b88d Binary files /dev/null and b/src/sixaunyi/app/src/main/jniLibs/armeabi/libAMapSDK_MAP_v9_6_0.so differ diff --git a/src/sixaunyi/app/src/main/jniLibs/x86_64/libAMapSDK_MAP_v9_6_0.so b/src/sixaunyi/app/src/main/jniLibs/x86_64/libAMapSDK_MAP_v9_6_0.so new file mode 100644 index 0000000..7283219 Binary files /dev/null and b/src/sixaunyi/app/src/main/jniLibs/x86_64/libAMapSDK_MAP_v9_6_0.so differ diff --git a/src/sixaunyi/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/src/sixaunyi/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/src/sixaunyi/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/sixaunyi/app/src/main/res/drawable-v24/icon_clear.png b/src/sixaunyi/app/src/main/res/drawable-v24/icon_clear.png new file mode 100644 index 0000000..6c04847 Binary files /dev/null and b/src/sixaunyi/app/src/main/res/drawable-v24/icon_clear.png differ diff --git a/src/sixaunyi/app/src/main/res/drawable-v24/img.png b/src/sixaunyi/app/src/main/res/drawable-v24/img.png new file mode 100644 index 0000000..49aa26d Binary files /dev/null and b/src/sixaunyi/app/src/main/res/drawable-v24/img.png differ diff --git a/src/sixaunyi/app/src/main/res/drawable/ic_launcher_background.xml b/src/sixaunyi/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/src/sixaunyi/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/sixaunyi/app/src/main/res/drawable/icon_favorite_red.xml b/src/sixaunyi/app/src/main/res/drawable/icon_favorite_red.xml new file mode 100644 index 0000000..6ec39d1 --- /dev/null +++ b/src/sixaunyi/app/src/main/res/drawable/icon_favorite_red.xml @@ -0,0 +1,12 @@ + + + + + diff --git a/src/sixaunyi/app/src/main/res/layout/activity_detect.xml b/src/sixaunyi/app/src/main/res/layout/activity_detect.xml new file mode 100644 index 0000000..133346f --- /dev/null +++ b/src/sixaunyi/app/src/main/res/layout/activity_detect.xml @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/src/sixaunyi/app/src/main/res/layout/activity_main.xml b/src/sixaunyi/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..9b22d51 --- /dev/null +++ b/src/sixaunyi/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + diff --git a/src/sixaunyi/app/src/main/res/layout/activity_video.xml b/src/sixaunyi/app/src/main/res/layout/activity_video.xml new file mode 100644 index 0000000..30db315 --- /dev/null +++ b/src/sixaunyi/app/src/main/res/layout/activity_video.xml @@ -0,0 +1,39 @@ + + + + + + + + +