diff --git a/.gitignore b/.gitignore
index 347e252..1ce5acb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,5 @@ google-services.json
# Android Profiling
*.hprof
+
+.DS_Store
diff --git a/README.md b/README.md
index ac25a28..8bd7aec 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,6 @@
# mEDIFIER
-Edifier Connect(140MB+)->mEDIFIER(3MB+)
+I just don't know why the Edifier Connect takes more than 200MB on my phone.
+
+# Limitations
++ Tested on W820NB and W820NB Plus only
++ Works for RFCOMM only
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..c407dda
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,33 @@
+plugins {
+ id 'com.android.application'
+}
+
+android {
+ namespace 'priv.wh201906.medifier'
+ compileSdk 31
+
+ defaultConfig {
+ applicationId "priv.wh201906.medifier"
+ minSdk 19
+ targetSdk 31
+ versionCode 1
+ versionName "0.0.1"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+}
+
+dependencies {
+
+ implementation 'androidx.appcompat:appcompat:1.4.1'
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
+}
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /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
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..79280b3
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/priv/wh201906/medifier/MainActivity.java b/app/src/main/java/priv/wh201906/medifier/MainActivity.java
new file mode 100644
index 0000000..fb3b3db
--- /dev/null
+++ b/app/src/main/java/priv/wh201906/medifier/MainActivity.java
@@ -0,0 +1,281 @@
+package priv.wh201906.medifier;
+
+import androidx.annotation.NonNull;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.app.ActivityCompat;
+
+import android.Manifest;
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothSocket;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.os.Bundle;
+import android.os.ParcelUuid;
+import android.util.Log;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.SimpleAdapter;
+import android.widget.Toast;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+public class MainActivity extends AppCompatActivity
+{
+ private static final String TAG = "mEDIFIER";
+ private final UUID SPP_UUID = UUID.fromString("EDF00000-EDFE-DFED-FEDF-EDFEDFEDFEDF");
+ private BluetoothAdapter mBluetoothAdapter;
+ private BluetoothSocket mBluetoothSocket;
+ private OutputStream mOutputStream;
+ private boolean mConnected = false;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ Button connectButton = findViewById(R.id.connectButton);
+ ListView commandListView = findViewById(R.id.commandListView);
+
+ connectButton.setOnClickListener(view ->
+ {
+ mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
+
+ if (mBluetoothAdapter == null)
+ {
+ Toast.makeText(getApplicationContext(), R.string.toast_no_bluetooth, Toast.LENGTH_SHORT).show();
+ }
+ if (!mBluetoothAdapter.isEnabled())
+ {
+ Toast.makeText(getApplicationContext(), R.string.toast_bluetooth_not_open, Toast.LENGTH_SHORT).show();
+ }
+ else
+ {
+ connectToDevice();
+ }
+
+ });
+
+ InputStream inputStream = getResources().openRawResource(R.raw.cmd);
+ BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+ StringBuilder stringBuilder = new StringBuilder();
+ String line;
+ try
+ {
+ while ((line = reader.readLine()) != null)
+ stringBuilder.append(line);
+ reader.close();
+ inputStream.close();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ JSONArray jsonArray = null;
+ List