diff --git a/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/build.gradle b/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/build.gradle new file mode 100644 index 00000000..d4384c65 --- /dev/null +++ b/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/build.gradle @@ -0,0 +1,53 @@ +plugins { + id 'com.android.application' + id 'kotlin-android' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + buildFeatures{ + viewBinding true + } + + defaultConfig { + applicationId "com.example.aipd" + minSdkVersion 24 + targetSdkVersion 30 + 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 + } + kotlinOptions { + jvmTarget = '1.8' + } +} + +dependencies { + + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + //implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + implementation 'androidx.core:core-ktx:1.6.0' + implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'com.google.android.material:material:1.3.0' //1.3.0 + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + //testImplementation 'junit:junit:4.13.2' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' //1.1.2 + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' //3.3.0 + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8" +} \ No newline at end of file diff --git a/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/proguard-rules.pro b/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/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/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/src/androidTest/java/com/example/aipd/ExampleInstrumentedTest.kt b/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/src/androidTest/java/com/example/aipd/ExampleInstrumentedTest.kt new file mode 100644 index 00000000..32f1663b --- /dev/null +++ b/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/src/androidTest/java/com/example/aipd/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.aipd + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.example.aipd", appContext.packageName) + } +} \ No newline at end of file diff --git a/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/src/main/AndroidManifest.xml b/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..066f42b2 --- /dev/null +++ b/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/src/main/AndroidManifest.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/src/main/java/com/example/aipd/MainActivity.kt b/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/src/main/java/com/example/aipd/MainActivity.kt new file mode 100644 index 00000000..2a89742e --- /dev/null +++ b/arc_design_contest/2021/NYCU_AIoT_PD_foot_pressure_sensing_insole/AIPD/app/src/main/java/com/example/aipd/MainActivity.kt @@ -0,0 +1,143 @@ +package com.example.aipd + +import android.content.Context +import android.content.DialogInterface +import android.content.Intent +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import android.text.Editable +import android.text.TextWatcher +import android.util.Log.d +import android.view.View +import android.widget.Button +import android.widget.EditText +import androidx.appcompat.app.AlertDialog +import androidx.core.widget.addTextChangedListener +import com.google.android.material.dialog.MaterialAlertDialogBuilder +import com.google.android.material.snackbar.Snackbar + +class MainActivity : AppCompatActivity() { + + + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + + val usrName = findViewById(R.id.userName) + val passWord = findViewById(R.id.password) + val signInButton = findViewById