Adding database information insertion features in the phone app
authorrtrimana <rtrimana@uci.edu>
Tue, 26 Sep 2017 19:45:58 +0000 (12:45 -0700)
committerrtrimana <rtrimana@uci.edu>
Tue, 26 Sep 2017 19:45:58 +0000 (12:45 -0700)
39 files changed:
others/lede-gui/.gradle/3.3/taskArtifacts/fileHashes.bin
others/lede-gui/.gradle/3.3/taskArtifacts/fileSnapshots.bin
others/lede-gui/.gradle/3.3/taskArtifacts/taskArtifacts.bin
others/lede-gui/.gradle/3.3/taskArtifacts/taskArtifacts.lock
others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin
others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock
others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin
others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock
others/lede-gui/.idea/libraries/iotinstaller.xml [deleted file]
others/lede-gui/.idea/workspace.xml
others/lede-gui/build.gradle
others/lede-gui/lede-gui.iml
others/lede-gui/libs/iotinstaller.jar [deleted file]
others/lede-gui/src/main/AndroidManifest.xml
others/lede-gui/src/main/assets/add_comm.config [new file with mode: 0644]
others/lede-gui/src/main/assets/add_device.config [new file with mode: 0644]
others/lede-gui/src/main/assets/add_device_address.config [new file with mode: 0644]
others/lede-gui/src/main/java/com/example/lede2/AddDeviceActivity.java [new file with mode: 0644]
others/lede-gui/src/main/java/com/example/lede2/AddRelationActivity.java [new file with mode: 0644]
others/lede-gui/src/main/java/com/example/lede2/ConfigActivity.java
others/lede-gui/src/main/java/com/example/lede2/DeleteDeviceActivity.java [new file with mode: 0644]
others/lede-gui/src/main/java/com/example/lede2/EnrollDeviceActivity.java
others/lede-gui/src/main/java/com/example/lede2/ListActivity.java
others/lede-gui/src/main/java/com/example/lede2/MainActivity.java
others/lede-gui/src/main/java/com/example/lede2/MySQLInterface.config [deleted file]
others/lede-gui/src/main/java/com/example/lede2/SSH.java
others/lede-gui/src/main/java/com/example/lede2/SSH_MySQL.java [new file with mode: 0644]
others/lede-gui/src/main/res/layout/activity_add_device.xml [new file with mode: 0644]
others/lede-gui/src/main/res/layout/activity_add_relation.xml [new file with mode: 0644]
others/lede-gui/src/main/res/layout/activity_config.xml
others/lede-gui/src/main/res/layout/activity_delete_device.xml [new file with mode: 0644]
others/lede-gui/src/main/res/layout/activity_list.xml
others/lede-gui/src/main/res/layout/activity_main.xml
others/lede-gui/src/main/res/values/attrs.xml [new file with mode: 0644]
others/lede-gui/src/main/res/values/colors.xml
others/lede-gui/src/main/res/values/constants.xml
others/lede-gui/src/main/res/values/dimens.xml [new file with mode: 0644]
others/lede-gui/src/main/res/values/strings.xml
others/lede-gui/src/main/res/values/styles.xml

index 8a9ea4e..466d723 100644 (file)
Binary files a/others/lede-gui/.gradle/3.3/taskArtifacts/fileHashes.bin and b/others/lede-gui/.gradle/3.3/taskArtifacts/fileHashes.bin differ
index 5832079..1d63b58 100644 (file)
Binary files a/others/lede-gui/.gradle/3.3/taskArtifacts/fileSnapshots.bin and b/others/lede-gui/.gradle/3.3/taskArtifacts/fileSnapshots.bin differ
index 399927f..97f0849 100644 (file)
Binary files a/others/lede-gui/.gradle/3.3/taskArtifacts/taskArtifacts.bin and b/others/lede-gui/.gradle/3.3/taskArtifacts/taskArtifacts.bin differ
index a153485..b6450aa 100644 (file)
Binary files a/others/lede-gui/.gradle/3.3/taskArtifacts/taskArtifacts.lock and b/others/lede-gui/.gradle/3.3/taskArtifacts/taskArtifacts.lock differ
index c182c8b..ecaaa6c 100644 (file)
Binary files a/others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin and b/others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin differ
index 627cc8a..f864e15 100644 (file)
Binary files a/others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock and b/others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock differ
index e08f809..fb93f2d 100644 (file)
Binary files a/others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin and b/others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin differ
index 067e9e4..bba075a 100644 (file)
Binary files a/others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock and b/others/lede-gui/.gradle/3.3/tasks/_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock differ
diff --git a/others/lede-gui/.idea/libraries/iotinstaller.xml b/others/lede-gui/.idea/libraries/iotinstaller.xml
deleted file mode 100644 (file)
index 80ad498..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<component name="libraryTable">
-  <library name="iotinstaller">
-    <CLASSES>
-      <root url="jar://$PROJECT_DIR$/libs/iotinstaller.jar!/" />
-    </CLASSES>
-    <JAVADOC />
-    <SOURCES />
-  </library>
-</component>
\ No newline at end of file
index 9323b6a..be99b55 100644 (file)
@@ -6,6 +6,7 @@
     </shared>
   </component>
   <component name="AndroidLogFilters">
+    <option name="TOOL_WINDOW_CUSTOM_FILTER" value="LOAD" />
     <option name="TOOL_WINDOW_CONFIGURED_FILTER" value="Show only selected application" />
     <option name="TOOL_WINDOW_REGEXP_FILTER" value="false" />
   </component>
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
-      <file leaf-file-name="MainActivity.java" pinned="false" current-in-tab="true">
+      <file leaf-file-name="MainActivity.java" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/MainActivity.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="631">
-              <caret line="100" column="0" selection-start-line="100" selection-start-column="0" selection-end-line="100" selection-end-column="0" />
-              <folding />
+            <state relative-caret-position="607">
+              <caret line="101" column="21" selection-start-line="100" selection-start-column="12" selection-end-line="101" selection-end-column="21" />
+              <folding>
+                <element signature="imports" expanded="true" />
+                <element signature="e#3760#3821#0" expanded="true" />
+                <element signature="e#4406#4461#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       <file leaf-file-name="EnrollDeviceActivity.java" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/EnrollDeviceActivity.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="210">
-              <caret line="14" column="7" selection-start-line="14" selection-start-column="7" selection-end-line="14" selection-end-column="7" />
-              <folding />
+            <state relative-caret-position="315">
+              <caret line="51" column="12" selection-start-line="51" selection-start-column="8" selection-end-line="51" selection-end-column="12" />
+              <folding>
+                <element signature="imports" expanded="true" />
+                <element signature="e#4975#4993#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="ConfigActivity.java" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ConfigActivity.java">
+      <file leaf-file-name="SSH.java" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/SSH.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="45">
-              <caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
-              <folding />
+            <state relative-caret-position="127">
+              <caret line="124" column="30" selection-start-line="124" selection-start-column="30" selection-end-line="124" selection-end-column="30" />
+              <folding>
+                <element signature="e#0#121#0" expanded="true" />
+                <element signature="imports" expanded="true" />
+                <element signature="e#2775#2783#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       <file leaf-file-name="ListActivity.java" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ListActivity.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="165">
-              <caret line="11" column="0" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
+            <state relative-caret-position="440">
+              <caret line="47" column="8" selection-start-line="47" selection-start-column="8" selection-end-line="47" selection-end-column="8" />
+              <folding>
+                <element signature="imports" expanded="true" />
+                <element signature="e#1953#2177#0" expanded="true" />
+                <element signature="e#2176#2177#0" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="activity_list.xml" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_list.xml">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="126">
+              <caret line="21" column="36" selection-start-line="21" selection-start-column="36" selection-end-line="21" selection-end-column="36" />
+              <folding />
+            </state>
+          </provider>
+          <provider editor-type-id="android-designer2">
+            <state />
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="strings.xml" pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/main/res/values/strings.xml">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="105">
+              <caret line="7" column="80" selection-start-line="7" selection-start-column="80" selection-end-line="7" selection-end-column="80" />
               <folding />
             </state>
           </provider>
       <list>
         <option value="valueResourceFile" />
         <option value="resourceFile" />
+        <option value="Class" />
+        <option value="layoutResourceFile_vertical" />
       </list>
     </option>
   </component>
     </option>
     <option name="modificationStamps">
       <map>
-        <entry key="$PROJECT_DIR$" value="1505940424808" />
+        <entry key="$PROJECT_DIR$" value="1506033335642" />
         <entry key="C:\Users\BOWON KO\AndroidStudioProjects\Androidinit\lede2" value="10503612567953" />
       </map>
     </option>
         <option value="$PROJECT_DIR$/../sentinel/src/main/java/com/example/sentinel/MainActivity.java" />
         <option value="$PROJECT_DIR$/../sentinel/src/main/java/com/example/sentinel/SSH.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/ExplainActivity.java" />
-        <option value="$PROJECT_DIR$/src/main/res/values/strings.xml" />
         <option value="$PROJECT_DIR$/gradle/wrapper/gradle-wrapper.properties" />
         <option value="$PROJECT_DIR$/build.gradle" />
-        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/MySQLInterface.config" />
         <option value="$USER_HOME$/Android/Sdk/platforms/android-26/android.jar!/android/app/Activity.class" />
         <option value="$PROJECT_DIR$/src/main/res/layout/activity_config.xml" />
         <option value="$PROJECT_DIR$/src/main/res/values/Constants.xml" />
         <option value="$PROJECT_DIR$/src/main/res/xml/constants.xml" />
-        <option value="$PROJECT_DIR$/src/main/res/values/constants.xml" />
+        <option value="$PROJECT_DIR$/src/main/AndroidManifest.xml" />
+        <option value="$PROJECT_DIR$/src/main/res/layout/activity_enroll_device.xml" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/add_device.config" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/MySQLInterface.config" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/AddDeviceInfoActivity.java" />
+        <option value="$PROJECT_DIR$/src/main/res/layout/content_add_device_info.xml" />
+        <option value="$PROJECT_DIR$/src/main/res/layout/activity_add_device_info.xml" />
+        <option value="$PROJECT_DIR$/src/main/assets/add_device.config" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/ConfigActivity.java" />
-        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/ListActivity.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/SSH_MySQL.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/SSH.java" />
+        <option value="$PROJECT_DIR$/src/main/assets/add_device_address.config" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/AddDeviceActivity.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/DeleteDeviceActivity.java" />
+        <option value="$PROJECT_DIR$/src/main/res/layout/activity_add_comm.xml" />
+        <option value="$PROJECT_DIR$/src/main/res/layout/activity_delete_device.xml" />
+        <option value="$PROJECT_DIR$/src/main/res/layout/activity_add_device.xml" />
+        <option value="$PROJECT_DIR$/src/main/assets/add_comm.config" />
+        <option value="$PROJECT_DIR$/src/main/res/layout/activity_main.xml" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/AddCommActivity.java" />
+        <option value="$PROJECT_DIR$/src/main/res/layout/activity_add_relation.xml" />
+        <option value="$PROJECT_DIR$/src/main/res/values/constants.xml" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/MainActivity.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/AddRelationActivity.java" />
+        <option value="$PROJECT_DIR$/src/main/res/values/strings.xml" />
         <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/EnrollDeviceActivity.java" />
-        <option value="$PROJECT_DIR$/src/main/AndroidManifest.xml" />
-        <option value="$PROJECT_DIR$/src/main/res/layout/activity_main.xml" />
-        <option value="$PROJECT_DIR$/src/main/res/layout/activity_enroll_device.xml" />
+        <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/ListActivity.java" />
         <option value="$PROJECT_DIR$/src/main/res/layout/activity_list.xml" />
       </list>
     </option>
   </component>
   <component name="ProjectFrameBounds">
-    <option name="x" value="103" />
-    <option name="y" value="167" />
-    <option name="width" value="1468" />
-    <option name="height" value="839" />
+    <option name="x" value="65" />
+    <option name="y" value="24" />
+    <option name="width" value="1615" />
+    <option name="height" value="1026" />
   </component>
   <component name="ProjectLevelVcsManager" settingsEditedManually="false">
     <OptionsSetting value="true" id="Add" />
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
           </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede-gui" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede-gui" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="main" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede-gui" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede-gui" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="main" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="res" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede-gui" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede-gui" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="main" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="res" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="values" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede-gui" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede-gui" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="main" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="res" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="layout" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
+          <PATH>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede-gui" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede-gui" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="src" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="main" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="java" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+            <PATH_ELEMENT>
+              <option name="myItemId" value="lede2" />
+              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+            </PATH_ELEMENT>
+          </PATH>
           <PATH>
             <PATH_ELEMENT>
               <option name="myItemId" value="lede-gui" />
   </component>
   <component name="RecentsManager">
     <key name="MoveFile.RECENT_KEYS">
+      <recent name="$PROJECT_DIR$/src/main/assets" />
       <recent name="$PROJECT_DIR$/src/main/res/values" />
       <recent name="$PROJECT_DIR$/src/main/res/xml" />
       <recent name="C:\Users\BOWON KO\AndroidStudioProjects\Androidinit\lede2\src\main\res\drawable" />
     <key name="android.template.packageName">
       <recent name="com.example.lede2" />
     </key>
-    <key name="CopyClassDialog.RECENTS_KEY">
-      <recent name="com.example.sentinel" />
+    <key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
+      <recent name="com.example.lede2" />
     </key>
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="$PROJECT_DIR$/src/main/res/layout" />
       <recent name="C:\Users\BOWON KO\AndroidStudioProjects\Androidinit\lede2\src\main\res\drawable" />
     </key>
+    <key name="CopyClassDialog.RECENTS_KEY">
+      <recent name="com.example.lede2" />
+      <recent name="com.example.sentinel" />
+    </key>
+    <key name="android.template.parentActivityClass">
+      <recent name="" />
+    </key>
   </component>
   <component name="RunManager" selected="Android App.lede-gui">
     <configuration default="true" type="AndroidJUnit" factoryName="Android JUnit">
     </todo-panel>
   </component>
   <component name="ToolWindowManager">
-    <frame x="103" y="167" width="1468" height="839" extended-state="0" />
-    <editor active="false" />
+    <frame x="65" y="24" width="1615" height="1026" extended-state="6" />
+    <editor active="true" />
     <layout>
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32719547" sideWeight="0.49475157" order="6" side_tool="false" content_ui="tabs" />
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.29036826" sideWeight="0.47416666" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.28713968" sideWeight="0.458891" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
       <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32786885" sideWeight="0.5022307" order="7" side_tool="true" content_ui="tabs" />
-      <window_info id="Android Monitor" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.4055944" sideWeight="0.5583685" order="7" side_tool="false" content_ui="tabs" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25094578" sideWeight="0.4838256" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Android Monitor" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2827051" sideWeight="0.49840662" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2974108" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25055432" sideWeight="0.5589548" order="2" side_tool="false" content_ui="tabs" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
-      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3292683" sideWeight="0.49776927" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3292683" sideWeight="0.4901211" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Captures" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
       <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Gradle Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.4055944" sideWeight="0.4416315" order="7" side_tool="true" content_ui="tabs" />
-      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20112517" sideWeight="0.4915254" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Gradle Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.28713968" sideWeight="0.54110897" order="7" side_tool="true" content_ui="tabs" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22370937" sideWeight="0.4915254" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.20066519" sideWeight="0.4901211" order="1" side_tool="false" content_ui="tabs" />
       <window_info id="Gradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32981715" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
       <window_info id="Android Model" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
       <window_info id="Assistant" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32950923" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
-      <window_info id="Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2974108" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
     </layout>
   </component>
+  <component name="UnknownFeatures">
+    <option featureType="com.intellij.fileTypeFactory" implementationName="*.config" />
+  </component>
   <component name="Vcs.Log.UiProperties">
     <option name="RECENTLY_FILTERED_USER_GROUPS">
       <collection />
     <watches-manager />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_enroll_device.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2000">
-          <caret line="80" column="47" selection-start-line="80" selection-start-column="47" selection-end-line="80" selection-end-column="47" />
-        </state>
-      </provider>
-      <provider editor-type-id="android-designer2">
+    <entry file="file://$PROJECT_DIR$/../sentinel/src/main/java/com/example/sentinel/MainActivity.java" />
+    <entry file="file://$PROJECT_DIR$/../sentinel/src/main/java/com/example/sentinel/SSH.java" />
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/Test.java" />
+    <entry file="file://$PROJECT_DIR$/src/main/res/drawable/BLUE.png" />
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ExplainActivity.java" />
+    <entry file="file://$PROJECT_DIR$/src/main/res/drawable/background.png">
+      <provider selected="true" editor-type-id="images">
         <state />
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ExplainActivity.java" />
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_explain.xml" />
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_main.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1050">
-          <caret line="42" column="30" selection-start-line="42" selection-start-column="30" selection-end-line="42" selection-end-column="30" />
-        </state>
+    <entry file="file://$PROJECT_DIR$/src/main/res/drawable/blueberry.jpg">
+      <provider selected="true" editor-type-id="images">
+        <state />
       </provider>
-      <provider editor-type-id="android-designer2">
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/res/drawable/home.jpg" />
+    <entry file="file://$PROJECT_DIR$/src/main/res/drawable/bluename.png">
+      <provider selected="true" editor-type-id="images">
         <state />
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_explain.xml" />
     <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_test.xml" />
     <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_wifi.xml" />
-    <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml">
+    <entry file="file://$PROJECT_DIR$/../app/src/main/AndroidManifest.xml" />
+    <entry file="file://$PROJECT_DIR$/../app/src/main/java/com/example/bowonko/androidinit/MainActivity.java" />
+    <entry file="file://$PROJECT_DIR$/gradle/wrapper/gradle-wrapper.properties">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="275">
-          <caret line="11" column="43" selection-start-line="11" selection-start-column="43" selection-end-line="11" selection-end-column="43" />
-          <folding />
+        <state relative-caret-position="90">
+          <caret line="6" column="0" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/EnrollDeviceActivity.java">
+    <entry file="file://$PROJECT_DIR$/build.gradle">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="350">
-          <caret line="22" column="22" selection-start-line="22" selection-start-column="22" selection-end-line="22" selection-end-column="22" />
-          <folding />
+        <state relative-caret-position="264">
+          <caret line="40" column="53" selection-start-line="40" selection-start-column="53" selection-end-line="40" selection-end-column="53" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/MainActivity.java">
+    <entry file="jar://$USER_HOME$/Android/Sdk/platforms/android-26/android.jar!/android/app/Activity.class">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2825">
-          <caret line="144" column="95" selection-start-line="144" selection-start-column="95" selection-end-line="144" selection-end-column="95" />
-          <folding />
+        <state relative-caret-position="6245">
+          <caret line="839" column="16" selection-start-line="839" selection-start-column="16" selection-end-line="839" selection-end-column="16" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/../sentinel/src/main/java/com/example/sentinel/MainActivity.java" />
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/SSH.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="200">
-          <caret line="20" column="13" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="13" />
-          <folding>
-            <element signature="e#0#121#0" expanded="false" />
-            <element signature="imports" expanded="false" />
-          </folding>
+    <entry file="file://$PROJECT_DIR$/src/main/res/values/Constants.xml" />
+    <entry file="file://$PROJECT_DIR$/src/main/res/values/constants.xml">
+      <provider editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
         </state>
       </provider>
+      <provider selected="true" editor-type-id="android-designer2">
+        <state />
+      </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/../sentinel/src/main/java/com/example/sentinel/SSH.java" />
-    <entry file="file://$PROJECT_DIR$/../sentinel/src/main/java/com/example/sentinel/register.java" />
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_enroll_device.xml">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/AddDeviceInfoActivity.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="750">
-          <caret line="30" column="51" selection-start-line="30" selection-start-column="51" selection-end-line="30" selection-end-column="51" />
+        <state relative-caret-position="34">
+          <caret line="45" column="29" selection-start-line="45" selection-start-column="29" selection-end-line="45" selection-end-column="29" />
+          <folding />
         </state>
       </provider>
-      <provider editor-type-id="android-designer2">
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_add_device_info.xml">
+      <provider editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+      <provider selected="true" editor-type-id="android-designer2">
         <state />
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ExplainActivity.java" />
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_main.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="925">
-          <caret line="37" column="40" selection-start-line="37" selection-start-column="40" selection-end-line="37" selection-end-column="40" />
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/content_add_device_info.xml">
+      <provider editor-type-id="text-editor">
+        <state relative-caret-position="705">
+          <caret line="47" column="0" selection-start-line="47" selection-start-column="0" selection-end-line="47" selection-end-column="0" />
+          <folding />
         </state>
       </provider>
-      <provider editor-type-id="android-designer2">
+      <provider selected="true" editor-type-id="android-designer2">
         <state />
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml">
+    <entry file="jar://$USER_HOME$/Android/Sdk/platforms/android-26/android.jar!/java/lang/ClassLoader.class">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="0">
-          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+        <state relative-caret-position="377">
+          <caret line="145" column="0" selection-start-line="145" selection-start-column="0" selection-end-line="145" selection-end-column="0" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/../sentinel/src/main/java/com/example/sentinel/register.java" />
-    <entry file="file://$PROJECT_DIR$/../sentinel/src/main/java/com/example/sentinel/MainActivity.java" />
-    <entry file="file://$PROJECT_DIR$/../sentinel/src/main/java/com/example/sentinel/SSH.java" />
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/Test.java" />
-    <entry file="file://$PROJECT_DIR$/build/intermediates/res/merged/debug/layout/activity_list.xml">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/MySQLInterface.config">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1100">
-          <caret line="44" column="0" selection-start-line="44" selection-start-column="0" selection-end-line="44" selection-end-column="0" />
+        <state relative-caret-position="45">
+          <caret line="3" column="18" selection-start-line="3" selection-start-column="18" selection-end-line="3" selection-end-column="18" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/drawable/BLUE.png" />
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ExplainActivity.java" />
-    <entry file="file://$PROJECT_DIR$/src/main/res/drawable/background.png">
-      <provider selected="true" editor-type-id="images">
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/content_delete_device.xml">
+      <provider editor-type-id="text-editor">
+        <state relative-caret-position="0">
+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+      <provider selected="true" editor-type-id="android-designer2">
         <state />
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/drawable/blueberry.jpg">
-      <provider selected="true" editor-type-id="images">
-        <state />
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/SSH_MySQL.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="1426">
+          <caret line="148" column="0" selection-start-line="148" selection-start-column="0" selection-end-line="148" selection-end-column="0" />
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
+        </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/drawable/home.jpg" />
-    <entry file="file://$PROJECT_DIR$/src/main/res/drawable/bluename.png">
-      <provider selected="true" editor-type-id="images">
+    <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="420">
+          <caret line="28" column="26" selection-start-line="28" selection-start-column="26" selection-end-line="28" selection-end-column="26" />
+          <folding />
+        </state>
+      </provider>
+      <provider editor-type-id="android-manifest">
         <state />
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_explain.xml" />
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_test.xml" />
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_wifi.xml" />
-    <entry file="file://$PROJECT_DIR$/src/main/res/values/strings.xml">
+    <entry file="file://$PROJECT_DIR$/src/main/assets/add_device.config">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="150">
-          <caret line="6" column="23" selection-start-line="6" selection-start-column="23" selection-end-line="6" selection-end-column="23" />
+        <state relative-caret-position="15">
+          <caret line="1" column="3" selection-start-line="1" selection-start-column="3" selection-end-line="1" selection-end-column="3" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/../app/src/main/AndroidManifest.xml" />
-    <entry file="file://$PROJECT_DIR$/../app/src/main/java/com/example/bowonko/androidinit/MainActivity.java" />
-    <entry file="file://$PROJECT_DIR$/gradle/wrapper/gradle-wrapper.properties">
+    <entry file="file://$PROJECT_DIR$/src/main/assets/add_device_address.config">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="90">
-          <caret line="6" column="0" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
+        <state relative-caret-position="15">
+          <caret line="1" column="27" selection-start-line="1" selection-start-column="27" selection-end-line="1" selection-end-column="27" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/build.gradle">
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_delete_device.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="264">
-          <caret line="40" column="53" selection-start-line="40" selection-start-column="53" selection-end-line="40" selection-end-column="53" />
+        <state relative-caret-position="90">
+          <caret line="6" column="57" selection-start-line="6" selection-start-column="57" selection-end-line="6" selection-end-column="57" />
+          <folding />
         </state>
       </provider>
+      <provider editor-type-id="android-designer2">
+        <state />
+      </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/MySQLInterface.config">
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_config.xml">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="90">
-          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
+          <caret line="6" column="51" selection-start-line="6" selection-start-column="37" selection-end-line="6" selection-end-column="51" />
+          <folding />
         </state>
       </provider>
+      <provider editor-type-id="android-designer2">
+        <state />
+      </provider>
     </entry>
-    <entry file="jar://$USER_HOME$/Android/Sdk/platforms/android-26/android.jar!/android/app/Activity.class">
+    <entry file="file://$PROJECT_DIR$/src/main/assets/add_comm.config">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="6245">
-          <caret line="839" column="16" selection-start-line="839" selection-start-column="16" selection-end-line="839" selection-end-column="16" />
+        <state relative-caret-position="30">
+          <caret line="2" column="5" selection-start-line="2" selection-start-column="5" selection-end-line="2" selection-end-column="5" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/values/Constants.xml" />
-    <entry file="file://$PROJECT_DIR$/src/main/res/values/constants.xml">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/DeleteDeviceActivity.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="180">
+          <caret line="57" column="28" selection-start-line="57" selection-start-column="28" selection-end-line="57" selection-end-column="28" />
+          <folding>
+            <element signature="imports" expanded="false" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/content_add_relation.xml">
       <provider editor-type-id="text-editor">
         <state relative-caret-position="0">
           <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
+          <folding />
         </state>
       </provider>
       <provider selected="true" editor-type-id="android-designer2">
         <state />
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/SSH.java">
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_add_comm.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="489">
-          <caret line="111" column="0" selection-start-line="111" selection-start-column="0" selection-end-line="111" selection-end-column="0" />
-          <folding>
-            <element signature="e#0#121#0" expanded="false" />
-            <element signature="imports" expanded="false" />
-          </folding>
+        <state relative-caret-position="90">
+          <caret line="6" column="52" selection-start-line="0" selection-start-column="0" selection-end-line="92" selection-end-column="0" />
+          <folding />
         </state>
       </provider>
+      <provider editor-type-id="android-designer2">
+        <state />
+      </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/values/constants.xml">
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_add_device.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="90">
+          <caret line="6" column="54" selection-start-line="6" selection-start-column="54" selection-end-line="6" selection-end-column="54" />
+          <folding />
+        </state>
+      </provider>
+      <provider editor-type-id="android-designer2">
+        <state />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/AddCommActivity.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="60">
-          <caret line="4" column="51" selection-start-line="4" selection-start-column="51" selection-end-line="4" selection-end-column="51" />
+        <state relative-caret-position="195">
+          <caret line="17" column="114" selection-start-line="17" selection-start-column="54" selection-end-line="17" selection-end-column="114" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_list.xml">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/AddDeviceActivity.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="398">
+          <caret line="88" column="12" selection-start-line="88" selection-start-column="12" selection-end-line="88" selection-end-column="12" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_add_relation.xml">
       <provider editor-type-id="text-editor">
-        <state relative-caret-position="195">
-          <caret line="13" column="37" selection-start-line="13" selection-start-column="37" selection-end-line="13" selection-end-column="37" />
+        <state relative-caret-position="839">
+          <caret line="92" column="0" selection-start-line="92" selection-start-column="0" selection-end-line="92" selection-end-column="0" />
+          <folding />
         </state>
       </provider>
       <provider selected="true" editor-type-id="android-designer2">
         <state />
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_config.xml">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/AddRelationActivity.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="660">
+          <caret line="44" column="18" selection-start-line="44" selection-start-column="18" selection-end-line="44" selection-end-column="18" />
+          <folding>
+            <element signature="imports" expanded="false" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_main.xml">
       <provider editor-type-id="text-editor">
-        <state relative-caret-position="303">
-          <caret line="66" column="21" selection-start-line="66" selection-start-column="21" selection-end-line="66" selection-end-column="21" />
+        <state relative-caret-position="262">
+          <caret line="132" column="8" selection-start-line="132" selection-start-column="8" selection-end-line="132" selection-end-column="8" />
           <folding />
         </state>
       </provider>
         <state />
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/build/intermediates/res/merged/debug/layout/activity_list.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="207">
+          <caret line="25" column="0" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_enroll_device.xml">
       <provider editor-type-id="text-editor">
         <state relative-caret-position="120">
           <caret line="8" column="0" selection-start-line="8" selection-start-column="0" selection-end-line="8" selection-end-column="0" />
+          <folding />
         </state>
       </provider>
       <provider selected="true" editor-type-id="android-designer2">
         <state />
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/AndroidManifest.xml">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/MainActivity.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="360">
-          <caret line="24" column="0" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
-          <folding />
+        <state relative-caret-position="607">
+          <caret line="101" column="21" selection-start-line="100" selection-start-column="12" selection-end-line="101" selection-end-column="21" />
+          <folding>
+            <element signature="imports" expanded="true" />
+            <element signature="e#3760#3821#0" expanded="true" />
+            <element signature="e#4406#4461#0" expanded="true" />
+          </folding>
         </state>
       </provider>
-      <provider editor-type-id="android-manifest">
-        <state />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/EnrollDeviceActivity.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="315">
+          <caret line="51" column="12" selection-start-line="51" selection-start-column="8" selection-end-line="51" selection-end-column="12" />
+          <folding>
+            <element signature="imports" expanded="true" />
+            <element signature="e#4975#4993#0" expanded="true" />
+          </folding>
+        </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_main.xml">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/SSH.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-7">
-          <caret line="71" column="0" selection-start-line="71" selection-start-column="0" selection-end-line="71" selection-end-column="0" />
-          <folding />
+        <state relative-caret-position="127">
+          <caret line="124" column="30" selection-start-line="124" selection-start-column="30" selection-end-line="124" selection-end-column="30" />
+          <folding>
+            <element signature="e#0#121#0" expanded="true" />
+            <element signature="imports" expanded="true" />
+            <element signature="e#2775#2783#0" expanded="true" />
+          </folding>
         </state>
       </provider>
-      <provider editor-type-id="android-designer2">
-        <state />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ListActivity.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="440">
+          <caret line="47" column="8" selection-start-line="47" selection-start-column="8" selection-end-line="47" selection-end-column="8" />
+          <folding>
+            <element signature="imports" expanded="true" />
+            <element signature="e#1953#2177#0" expanded="true" />
+            <element signature="e#2176#2177#0" expanded="true" />
+          </folding>
+        </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ConfigActivity.java">
+    <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_list.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="45">
-          <caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
+        <state relative-caret-position="126">
+          <caret line="21" column="36" selection-start-line="21" selection-start-column="36" selection-end-line="21" selection-end-column="36" />
           <folding />
         </state>
       </provider>
+      <provider editor-type-id="android-designer2">
+        <state />
+      </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ListActivity.java">
+    <entry file="file://$PROJECT_DIR$/src/main/res/values/constants.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="165">
-          <caret line="11" column="0" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
+        <state relative-caret-position="315">
+          <caret line="21" column="104" selection-start-line="21" selection-start-column="104" selection-end-line="21" selection-end-column="104" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/EnrollDeviceActivity.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ConfigActivity.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="210">
-          <caret line="14" column="7" selection-start-line="14" selection-start-column="7" selection-end-line="14" selection-end-column="7" />
-          <folding />
+        <state relative-caret-position="214">
+          <caret line="51" column="47" selection-start-line="51" selection-start-column="47" selection-end-line="51" selection-end-column="47" />
+          <folding>
+            <element signature="e#1964#1978#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/MainActivity.java">
+    <entry file="file://$PROJECT_DIR$/src/main/res/values/strings.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="631">
-          <caret line="100" column="0" selection-start-line="100" selection-start-column="0" selection-end-line="100" selection-end-column="0" />
+        <state relative-caret-position="105">
+          <caret line="7" column="80" selection-start-line="7" selection-start-column="80" selection-end-line="7" selection-end-column="80" />
           <folding />
         </state>
       </provider>
index f74784d..b9dd0d4 100644 (file)
@@ -45,5 +45,6 @@ dependencies {
     compile 'com.android.support:appcompat-v7:26.+'\r
     compile 'com.android.support.constraint:constraint-layout:1.0.2'\r
     compile 'com.android.support:design:26.0.0-alpha1'\r
+    compile 'com.android.support:support-v4:26.+'\r
     testCompile 'junit:junit:4.12'\r
 }\r
index b56780f..74baa3e 100644 (file)
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
       <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
       <excludeFolder url="file://$MODULE_DIR$/build/android-profile" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
@@ -90,6 +91,7 @@
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
     <orderEntry type="library" exported="" scope="TEST" name="javax.annotation-api-1.2" level="project" />
     <orderEntry type="library" exported="" scope="TEST" name="javax.inject-1" level="project" />
     <orderEntry type="library" exported="" name="appcompat-v7-26.0.0-alpha1" level="project" />
-    <orderEntry type="library" exported="" name="iotinstaller" level="project" />
     <orderEntry type="library" exported="" scope="TEST" name="javawriter-2.1.1" level="project" />
     <orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
     <orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
diff --git a/others/lede-gui/libs/iotinstaller.jar b/others/lede-gui/libs/iotinstaller.jar
deleted file mode 100644 (file)
index 1acf7be..0000000
Binary files a/others/lede-gui/libs/iotinstaller.jar and /dev/null differ
index c8e7e6f..57ca44d 100644 (file)
         </activity>\r
         <activity android:name=".EnrollDeviceActivity" />\r
         <activity android:name=".ListActivity" />\r
-        <activity android:name=".ConfigActivity"></activity>\r
+        <activity android:name=".ConfigActivity" />\r
+        <activity android:name=".AddDeviceActivity" />\r
+        <activity\r
+            android:name=".DeleteDeviceActivity"\r
+            android:label="@string/title_activity_delete_device"\r
+            android:theme="@style/AppTheme.NoActionBar" />\r
+        <activity\r
+            android:name=".AddRelationActivity"\r
+            android:label="@string/title_activity_add_relation"\r
+            android:theme="@style/AppTheme.NoActionBar"></activity>\r
     </application>\r
 \r
 </manifest>
\ No newline at end of file
diff --git a/others/lede-gui/src/main/assets/add_comm.config b/others/lede-gui/src/main/assets/add_comm.config
new file mode 100644 (file)
index 0000000..0a8a2ac
--- /dev/null
@@ -0,0 +1,3 @@
+CM4 AmcrestCameraCM4
+LB4 LifxLightBulbLB4
+WRITE
\ No newline at end of file
diff --git a/others/lede-gui/src/main/assets/add_device.config b/others/lede-gui/src/main/assets/add_device.config
new file mode 100644 (file)
index 0000000..4ecf673
--- /dev/null
@@ -0,0 +1,15 @@
+IoTMain
+ID CM4
+TYPE Camera
+TYPESPECIFIC AmcrestCamera
+END
+
+Table 2
+USERNAME VARCHAR 20
+PASSWORD VARCHAR 20
+END
+
+Data
+admin
+55779CatSoundz35
+END
\ No newline at end of file
diff --git a/others/lede-gui/src/main/assets/add_device_address.config b/others/lede-gui/src/main/assets/add_device_address.config
new file mode 100644 (file)
index 0000000..9867d01
--- /dev/null
@@ -0,0 +1,8 @@
+ID=CM4
+ADDRESSFOR=AmcrestCameraAdd
+DEVICEADDRESS=ab:cd:ef:12:34:56
+PORTNUMBER=888
+PROTOCOL=udp
+SOURCEWILDCARD=false
+DESTWILDCARD=false
+END
\ No newline at end of file
diff --git a/others/lede-gui/src/main/java/com/example/lede2/AddDeviceActivity.java b/others/lede-gui/src/main/java/com/example/lede2/AddDeviceActivity.java
new file mode 100644 (file)
index 0000000..fc4a075
--- /dev/null
@@ -0,0 +1,102 @@
+package com.example.lede2;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.View;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.sql.*;
+
+
+public class AddDeviceActivity extends AppCompatActivity implements View.OnClickListener,View.OnFocusChangeListener {
+
+    Button doneButton;
+    TextView databaseInfo;
+    TextView databaseAddressInfo;
+    private SSH_MySQL ssh;//Connection object between Android & Host
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_add_device);
+
+        doneButton = (Button) findViewById(R.id.doneButton);
+        databaseInfo = (EditText)findViewById(R.id.textInfo);
+        databaseAddressInfo = (EditText)findViewById(R.id.textInfoAddress);
+
+        doneButton.setOnClickListener(this);
+        databaseInfo.setOnFocusChangeListener(this);
+        databaseAddressInfo.setOnFocusChangeListener(this);
+        ssh = new SSH_MySQL();
+        // Set config text from file for device
+        try {
+            InputStream is = getAssets().open(MainActivity.DEF_ADD_DEVICE_FILE);
+            int size = is.available();
+            byte[] buffer = new byte[size];
+            is.read(buffer);
+            is.close();
+            String text = new String(buffer);
+            databaseInfo.setGravity(Gravity.LEFT);
+            databaseInfo.setText(text);
+            Log.d("LOADINGFILE", "Add device info file is already loaded!");
+        } catch (IOException ex) {
+            Log.d("LOADINGFILE", "Add device info file is NOT loaded!");
+            ex.printStackTrace();
+        }
+        // Set config text from file for device address
+        try {
+            InputStream is = getAssets().open(MainActivity.DEF_ADD_DEVICE_ADDRESS_FILE);
+            int size = is.available();
+            byte[] buffer = new byte[size];
+            is.read(buffer);
+            is.close();
+            String text = new String(buffer);
+            databaseAddressInfo.setGravity(Gravity.LEFT);
+            databaseAddressInfo.setText(text);
+            Log.d("LOADINGFILE", "Add device address info file is already loaded!");
+        } catch (IOException ex) {
+            Log.d("LOADINGFILE", "Add device address info file is NOT loaded!");
+            ex.printStackTrace();
+        }
+
+    }
+
+    @Override
+    public void onClick(View v) {
+        if(v == doneButton){
+            // 1) Create a new file and insert the configuration
+            // 2) Run iotinstaller code for device installation
+            // 3) Remove the existing config file
+            // 4) Repeat 1, 2, and 3 for device address
+            ssh.execute("echo \"" + databaseInfo.getText().toString() + "\" >> " +
+                    MainActivity.DEF_MYSQL_CONFIG_FILE + ";" +
+                    MainActivity.DEF_INSTALL_CMD + " " + MainActivity.DEF_MYSQL_CONFIG_FILE + ";" +
+                    "rm -rf " + MainActivity.DEF_MYSQL_CONFIG_FILE + ";" +
+                    // repeat process for device address
+                    "echo \"" + databaseAddressInfo.getText().toString() + "\" >> " +
+                    MainActivity.DEF_MYSQL_CONFIG_FILE + ";" +
+                    MainActivity.DEF_INSTALL_ADDRESS_CMD + " " + MainActivity.DEF_MYSQL_CONFIG_FILE + ";" +
+                    "rm -rf " + MainActivity.DEF_MYSQL_CONFIG_FILE);
+            finish();
+        }
+    }
+
+    @Override
+    public void onFocusChange(View view, boolean hasFocus) {
+        InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+        if (hasFocus) {
+            imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
+        } else {
+            imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
+        }
+    }
+}
diff --git a/others/lede-gui/src/main/java/com/example/lede2/AddRelationActivity.java b/others/lede-gui/src/main/java/com/example/lede2/AddRelationActivity.java
new file mode 100644 (file)
index 0000000..da54025
--- /dev/null
@@ -0,0 +1,75 @@
+package com.example.lede2;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.View;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class AddRelationActivity extends AppCompatActivity implements View.OnClickListener,View.OnFocusChangeListener {
+
+    Button doneButton;
+    TextView databaseInfo;
+    private SSH_MySQL ssh;//Connection object between Android & Host
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_add_relation);
+
+        doneButton = (Button) findViewById(R.id.doneButton);
+        databaseInfo = (EditText)findViewById(R.id.textInfoComm);
+
+        doneButton.setOnClickListener(this);
+        databaseInfo.setOnFocusChangeListener(this);
+        ssh = new SSH_MySQL();
+        // Set config text from file for device
+        try {
+            InputStream is = getAssets().open(MainActivity.DEF_ADD_DEVICE_COMM_FILE);
+            int size = is.available();
+            byte[] buffer = new byte[size];
+            is.read(buffer);
+            is.close();
+            String text = new String(buffer);
+            databaseInfo.setGravity(Gravity.LEFT);
+            databaseInfo.setText(text);
+            Log.d("LOADINGFILE", "Add comm info file is already loaded!");
+        } catch (IOException ex) {
+            Log.d("LOADINGFILE", "Add comm info file is NOT loaded!");
+            ex.printStackTrace();
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        if(v == doneButton){
+            // 1) Create a new file and insert the configuration
+            // 2) Run iotinstaller code for communication/relation installation
+            // 3) Remove the existing config file
+            ssh.execute("echo \"" + databaseInfo.getText().toString() + "\" >> " +
+                    MainActivity.DEF_MYSQL_CONFIG_FILE + ";" +
+                    MainActivity.DEF_INSTALL_RELATION_CMD + " " + MainActivity.DEF_MYSQL_CONFIG_FILE + ";" +
+                    "rm -rf " + MainActivity.DEF_MYSQL_CONFIG_FILE);
+            finish();
+        }
+    }
+
+    @Override
+    public void onFocusChange(View view, boolean hasFocus) {
+        InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+        if (hasFocus) {
+            imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
+        } else {
+            imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
+        }
+    }
+
+}
index de16fa9..5f20a69 100644 (file)
@@ -22,14 +22,16 @@ public class ConfigActivity extends AppCompatActivity implements View.OnClickLis
     public static String RPWD = MainActivity.DEF_RPWD;\r
     public static String ROUTERIP = MainActivity.DEF_ROUTERIP;\r
     public static String ROUTERUSER = MainActivity.DEF_ROUTERUSER;\r
-\r
+    public static String MYSQLHOSTUSER = MainActivity.DEF_MYSQLHOSTUSER;\r
+    public static String MYSQLHOSTIP = MainActivity.DEF_MYSQLHOSTIP;\r
+    public static String MYSQLHOSTPASSWORD = MainActivity.DEF_MYSQLHOSTPASSWORD;\r
 \r
     @Override\r
     protected void onCreate(Bundle savedInstanceState) {\r
         super.onCreate(savedInstanceState);\r
         setContentView(R.layout.activity_config);\r
 \r
-        ssid = (EditText) findViewById(R.id.ssid);\r
+        ssid = (EditText) findViewById(R.id.device_subtype);\r
         pwd = (EditText) findViewById(R.id.pwd);\r
         ip = (EditText) findViewById(R.id.ip);\r
         user = (EditText) findViewById(R.id.user);\r
diff --git a/others/lede-gui/src/main/java/com/example/lede2/DeleteDeviceActivity.java b/others/lede-gui/src/main/java/com/example/lede2/DeleteDeviceActivity.java
new file mode 100644 (file)
index 0000000..3036805
--- /dev/null
@@ -0,0 +1,85 @@
+package com.example.lede2;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+
+public class DeleteDeviceActivity extends AppCompatActivity implements View.OnClickListener, View.OnFocusChangeListener {
+
+    Button deleteButton;
+    Button doneButton;
+    EditText device_id;
+    EditText device_type;
+    EditText device_subtype;
+    EditText device_address_subtype;
+    TextView status;
+    private SSH_MySQL ssh;//Connection object between Android & Host
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_delete_device);
+
+        deleteButton = (Button) findViewById(R.id.delete);
+        doneButton = (Button) findViewById(R.id.done);
+        device_id = (EditText)findViewById(R.id.device_id);
+        device_type = (EditText)findViewById(R.id.device_type);
+        device_subtype = (EditText)findViewById(R.id.device_subtype);
+        device_address_subtype = (EditText)findViewById(R.id.device_address_subtype);
+        status = (TextView)findViewById(R.id.textStatus);
+
+        deleteButton.setOnClickListener(this);
+        doneButton.setOnClickListener(this);
+        device_id.setOnFocusChangeListener(this);
+        device_type.setOnFocusChangeListener(this);
+        device_subtype.setOnFocusChangeListener(this);
+        device_address_subtype.setOnFocusChangeListener(this);
+        ssh = new SSH_MySQL();
+    }
+
+    @Override
+    public void onClick(View v) {
+        if(v == deleteButton){
+            // Remove the entry based on ID, type, and subtype
+            ssh.execute(MainActivity.DEF_DELETE_CMD + " " +
+                    device_id.getText().toString() + " " +
+                    device_type.getText().toString() + " " +
+                    device_subtype.getText().toString() + ";" +
+                    // Also remove the device address
+                    MainActivity.DEF_DELETE_ADDRESS_CMD + " " +
+                    device_id.getText().toString() + " " +
+                    device_address_subtype.getText().toString()
+            );
+            device_id.setText("");
+            device_type.setText("");
+            device_subtype.setText("");
+            device_address_subtype.setText("");
+            status.setText("Successfully deleted " + device_id.getText());
+            /*try {
+                Thread.sleep(2000);
+            } catch (Exception ex) {
+                ex.printStackTrace();
+            }
+            status.setText("");*/
+        }
+        if(v == doneButton){
+            finish();
+        }
+
+    }
+
+    @Override
+    public void onFocusChange(View view, boolean hasFocus) {
+        InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+        if (hasFocus) {
+            imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
+        } else {
+            imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
+        }
+    }
+}
index 926870a..be1d04a 100644 (file)
@@ -100,19 +100,23 @@ public class EnrollDeviceActivity extends AppCompatActivity implements View.OnCl
                     ssh = new SSH();\r
 \r
                     // execute shell script  (script's function -> Save contents(Mac,Ip,Key,Name) on hostapd-psk)\r
-                    ssh.execute("-co " + networkPass + " " + deviceName +" "+ ConfigActivity.RPWD);//review!!!!!!\r
+                    ssh.execute("-co " + networkPass + " " + deviceName + " " + ConfigActivity.RPWD);//review!!!!!!\r
                     try {//To execute asyntask in ssh object, we have to sleep main thread\r
                         Thread.sleep(1000);\r
                     } catch (Exception e) {\r
                         Log.d("SLEEP EXCEPTION", "SLEEP EXCEPTION occurs in onClick method of EnrollDeviceActivity");\r
                     }\r
                     finish();//Go back to the Main Activity\r
-                } else { //if name of wifi is not LEDE2 -> go to wifi configuration screen to change wifi type\r
+                } else { //if name of wifi is not LEDE -> go to wifi configuration screen to change wifi type\r
                     Toast t = Toast.makeText(this, R.string.try_again, Toast.LENGTH_SHORT);\r
                     t.show();\r
                     startActivity(new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK));\r
                 }\r
             }\r
+            // Call activity that adds device - not doing this flow because we haven't found\r
+            // a way to change password without restarting WiFi\r
+            //startActivity(new Intent(this, AddDeviceActivity.class));\r
+            //finish();\r
         } else if (v == wifi) {\r
             startActivity(new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK));\r
         }\r
index 60bc1f8..5de1fd2 100644 (file)
@@ -1,24 +1,33 @@
 package com.example.lede2;\r
 \r
+import android.content.Intent;\r
 import android.support.v7.app.AppCompatActivity;\r
 import android.os.Bundle;\r
 import android.util.Log;\r
 import android.util.SparseBooleanArray;\r
 import android.view.View;\r
+import android.widget.AdapterView;\r
 import android.widget.ArrayAdapter;\r
 import android.widget.Button;\r
+import android.widget.EditText;\r
 import android.widget.ListView;\r
+import android.widget.TextView;\r
+import android.widget.Toast;\r
 \r
 import java.util.List;\r
 \r
 public class ListActivity extends AppCompatActivity implements View.OnClickListener {\r
 \r
     Button delete;//delete button in UI\r
-    Button selectAll;//select button in UI\r
+    Button deviceInfo;//select button in UI\r
     ListView listview;//listview in UI\r
     SSH ssh;//Connection object between Android & Router\r
     List<String> tmp;//data structure which has IoT device information already registered on LEDE2\r
     ArrayAdapter adapter;//adapter between tmp and listview\r
+    String device_info;\r
+    protected String deviceIp;\r
+    TextView ip;\r
+    TextView mac;\r
 \r
     @Override\r
     protected void onCreate(Bundle savedInstanceState) {\r
@@ -33,14 +42,20 @@ public class ListActivity extends AppCompatActivity implements View.OnClickListe
         }\r
 \r
         delete = (Button) findViewById(R.id.delete);\r
-        selectAll = (Button) findViewById(R.id.selectAll);\r
+        deviceInfo = (Button) findViewById(R.id.deviceInfo);\r
         listview = (ListView) findViewById(R.id.listView1);\r
+        ip = (TextView) findViewById(R.id.txt_ip);\r
+        mac = (TextView) findViewById(R.id.txt_mac);\r
 \r
         adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_multiple_choice, tmp);//register tmp array to adapter\r
 \r
         delete.setOnClickListener(this);\r
-        selectAll.setOnClickListener(this);\r
+        deviceInfo.setOnClickListener(this);\r
         listview.setAdapter(adapter);\r
+        listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {\r
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\r
+                device_info = listview.getItemAtPosition(position).toString();\r
+        }});\r
     }\r
 \r
     @Override\r
@@ -58,6 +73,7 @@ public class ListActivity extends AppCompatActivity implements View.OnClickListe
                     command += rmName + " ";//complete command\r
                     //remove this information on the listview\r
                     tmp.remove(i);\r
+                    //deviceIp = checkedItems.\r
                 }\r
             }\r
             try {\r
@@ -68,20 +84,24 @@ public class ListActivity extends AppCompatActivity implements View.OnClickListe
             } catch (Exception e) {\r
                 Log.d("SLEEP EXCEPTION", "SLEEP EXCEPTION occurs in onClick method of ListActivity");\r
             }\r
-\r
             //update\r
             adapter.notifyDataSetChanged();\r
-\r
             //delete checked mark in listview\r
             listview.clearChoices();\r
 \r
-        } else if (v == selectAll) {\r
+        } else if (v == deviceInfo) {\r
+            String[] devInfo = device_info.split("\\s+");\r
+            ip.setText(devInfo[1]);\r
+            mac.setText(devInfo[2]);\r
+            Toast t = Toast.makeText(this, device_info, Toast.LENGTH_SHORT);\r
+            t.show();\r
+            /*} else if (v == selectAll) {\r
             int count;\r
             count = adapter.getCount();\r
 \r
             for (int i = 0; i < count; i++) {\r
                 listview.setItemChecked(i, true);\r
-            }\r
+            }*/\r
         }\r
     }\r
 }\r
index d4ee5ea..7374bf1 100644 (file)
@@ -13,22 +13,36 @@ import android.widget.Button;
 import android.widget.TextView;\r
 import android.widget.Toast;\r
 \r
-import iotinstaller.IoTInstaller;\r
-\r
 public class MainActivity extends AppCompatActivity implements View.OnClickListener {\r
 \r
     Button registerButton;\r
     Button listButton;\r
+    Button insertDBButton;\r
+    Button deleteDBButton;\r
     Button configButton;\r
+    Button relationButton;\r
     TextView ssid;\r
     protected static Context context;\r
     protected static String DEF_RSSID;\r
     protected static String DEF_RPWD;\r
     protected static String DEF_ROUTERIP;\r
     protected static String DEF_ROUTERUSER;\r
+    protected static String DEF_MYSQLHOSTUSER;\r
+    protected static String DEF_MYSQLHOSTIP;\r
+    protected static String DEF_MYSQLHOSTPASSWORD;\r
     protected static String DEF_CHANGE_DEFAULT_SCRIPT;\r
     protected static String DEF_CONNECT_DEVICE_SCRIPT;\r
     protected static String DEF_REGISTER_DEVICE_SCRIPT;\r
+    protected static String DEF_ADD_DEVICE_FILE;\r
+    protected static String DEF_ADD_DEVICE_ADDRESS_FILE;\r
+    protected static String DEF_ADD_DEVICE_COMM_FILE;\r
+    protected static String DEF_ADD_DEVICE_TO_MYSQL;\r
+    protected static String DEF_MYSQL_CONFIG_FILE;\r
+    protected static String DEF_INSTALL_CMD;\r
+    protected static String DEF_DELETE_CMD;\r
+    protected static String DEF_INSTALL_ADDRESS_CMD;\r
+    protected static String DEF_DELETE_ADDRESS_CMD;\r
+    protected static String DEF_INSTALL_RELATION_CMD;\r
 \r
     @Override\r
     protected void onCreate(Bundle savedInstanceState) {\r
@@ -37,12 +51,18 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
 \r
         registerButton = (Button) findViewById(R.id.register);\r
         listButton = (Button) findViewById(R.id.list);\r
+        insertDBButton = (Button) findViewById(R.id.insert_db);\r
+        deleteDBButton = (Button) findViewById(R.id.delete_db);\r
         configButton = (Button) findViewById(R.id.config);\r
-        ssid = (TextView)findViewById(R.id.ssid);\r
+        relationButton = (Button) findViewById(R.id.add_comm);\r
+        ssid = (TextView)findViewById(R.id.device_subtype);\r
 \r
         registerButton.setOnClickListener(this);\r
         listButton.setOnClickListener(this);\r
+        insertDBButton.setOnClickListener(this);\r
+        deleteDBButton.setOnClickListener(this);\r
         configButton.setOnClickListener(this);\r
+        relationButton.setOnClickListener(this);\r
 \r
         context = getApplicationContext();\r
         DEF_RSSID = context.getResources().getString(R.string.default_rssid);\r
@@ -52,6 +72,19 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
         DEF_CHANGE_DEFAULT_SCRIPT = context.getResources().getString(R.string.change_default_script);\r
         DEF_CONNECT_DEVICE_SCRIPT = context.getResources().getString(R.string.connect_device_script);\r
         DEF_REGISTER_DEVICE_SCRIPT = context.getResources().getString(R.string.register_device_script);\r
+        DEF_ADD_DEVICE_FILE = context.getResources().getString(R.string.add_device_file);\r
+        DEF_ADD_DEVICE_ADDRESS_FILE = context.getResources().getString(R.string.add_device_address_file);\r
+        DEF_ADD_DEVICE_COMM_FILE = context.getResources().getString(R.string.add_device_comm_file);\r
+        DEF_MYSQLHOSTUSER = context.getResources().getString(R.string.mysql_hostuser);\r
+        DEF_MYSQLHOSTIP = context.getResources().getString(R.string.mysql_hostip);\r
+        DEF_MYSQLHOSTPASSWORD = context.getResources().getString(R.string.mysql_hostpassword);\r
+        DEF_ADD_DEVICE_TO_MYSQL = context.getResources().getString(R.string.add_device_to_mysql);\r
+        DEF_MYSQL_CONFIG_FILE = context.getResources().getString(R.string.mysql_config_file);\r
+        DEF_INSTALL_CMD = context.getResources().getString(R.string.install_cmd);\r
+        DEF_DELETE_CMD = context.getResources().getString(R.string.delete_cmd);\r
+        DEF_INSTALL_ADDRESS_CMD = context.getResources().getString(R.string.install_address_cmd);\r
+        DEF_DELETE_ADDRESS_CMD = context.getResources().getString(R.string.delete_address_cmd);\r
+        DEF_INSTALL_RELATION_CMD = context.getResources().getString(R.string.add_comm_cmd);\r
         ssid.setText(DEF_RSSID);\r
     }\r
 \r
@@ -72,13 +105,21 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
             if (v == registerButton) {\r
                 Log.d("CLICKING", "Clicking on register!");\r
                 startActivity(new Intent(this, EnrollDeviceActivity.class));\r
+                //startActivity(new Intent(this, AddDeviceActivity.class));\r
             } else if (v == listButton) {\r
+                Log.d("CLICKING", "Clicking on list activity!");\r
                 startActivity(new Intent(this, ListActivity.class));\r
+            } else if (v == insertDBButton) {\r
+                Log.d("CLICKING", "Clicking on add device!");\r
+                startActivity(new Intent(this, AddDeviceActivity.class));\r
+            } else if (v == deleteDBButton) {\r
+                Log.d("CLICKING", "Clicking on delete device!");\r
+                startActivity(new Intent(this, DeleteDeviceActivity.class));\r
+            } else if (v == relationButton) {\r
+                Log.d("CLICKING", "Clicking on add communication!");\r
+                startActivity(new Intent(this, AddRelationActivity.class));\r
             }\r
         }\r
-        //IoTInstaller ioTInstaller = new IoTInstaller();\r
-        //ioTInstaller.helpMessages();\r
-\r
     }\r
 \r
     boolean isNetworkAvailable() {//check whether wifi connection is or not\r
diff --git a/others/lede-gui/src/main/java/com/example/lede2/MySQLInterface.config b/others/lede-gui/src/main/java/com/example/lede2/MySQLInterface.config
deleted file mode 100644 (file)
index b809e59..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# MySQLInterface configuration
-
-#HOST=128.195.204.105
-HOST=localhost
-DATABASE=IoTMain
-USERNAME=root
-PASSWORD=1234
\ No newline at end of file
index 203ba79..9438053 100644 (file)
@@ -34,13 +34,13 @@ import java.util.List;
 public class SSH extends AsyncTask<String, Void, List<String>> {\r
 \r
        // variables used for connection\r
-       Session session;\r
-       Channel channel;\r
-       ChannelExec ce;\r
+       private Session session;\r
+       private Channel channel;\r
+       private ChannelExec ce;\r
        // in this project, we supposed we use fixed host, username, password\r
-       String host;\r
-       String username;\r
-       String password;\r
+       private String host;\r
+       private String username;\r
+       private String password;\r
 \r
        // host, username, password initialize\r
        @Override\r
@@ -57,8 +57,7 @@ public class SSH extends AsyncTask<String, Void, List<String>> {
        https://stackoverflow.com/questions/25789245/how-to-get-jsch-shell-command-output-in-string\r
        */\r
 \r
-\r
-       // open the conenction using username, password, and hostname\r
+       // open the connection using username, password, and hostname\r
        public boolean open() throws JSchException {\r
 \r
                JSch jSch = new JSch();\r
@@ -148,9 +147,9 @@ public class SSH extends AsyncTask<String, Void, List<String>> {
                        cmd = MainActivity.DEF_CHANGE_DEFAULT_SCRIPT + " " + params[0];\r
                } else if(params[0].substring(0,3).equals("-co")) { // ./connect_device.sh -co <password> <device-name>\r
                        cmd = MainActivity.DEF_CONNECT_DEVICE_SCRIPT + " " + params[0];\r
-               } else if(params[0].substring(0,3).equals("-dn")) { // ./register_device.sh -dn <devcie-name>\r
+               } else if(params[0].substring(0,3).equals("-dn")) { // ./register_device.sh -dn <device-name>\r
                        cmd = MainActivity.DEF_REGISTER_DEVICE_SCRIPT + " " + params[0];\r
-               } else if(params[0].substring(0,3).equals("-ln")) { // ./register_device.sh -ln <devcie-name>\r
+               } else if(params[0].substring(0,3).equals("-ln")) { // ./register_device.sh -ln <device-name>\r
                        // below block is a little different from others cause it needs to get output from the router\r
                        try {\r
                                // try open the connection\r
diff --git a/others/lede-gui/src/main/java/com/example/lede2/SSH_MySQL.java b/others/lede-gui/src/main/java/com/example/lede2/SSH_MySQL.java
new file mode 100644 (file)
index 0000000..7702fcb
--- /dev/null
@@ -0,0 +1,174 @@
+package com.example.lede2;
+
+/**
+ * Created by rtrimana on 9/25/17.
+ */
+
+import android.os.AsyncTask;
+import android.util.Log;
+
+import com.jcraft.jsch.Channel;
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import android.content.Context;
+import android.util.Log;
+import android.os.AsyncTask;
+
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.Channel;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+// AsyncTask input : command line
+// AysncTask output : output from a command
+public class SSH_MySQL extends AsyncTask<String, Void, List<String>> {
+
+    // variables used for connection
+    private Session session;
+    private Channel channel;
+    private ChannelExec ce;
+    // in this project, we supposed we use fixed host, username, password
+    private String host;
+    private String username;
+    private String password;
+
+    // host, username, password initialize
+    @Override
+    protected void onPreExecute() {
+        super.onPreExecute();
+
+        host = ConfigActivity.MYSQLHOSTIP;
+        username = ConfigActivity.MYSQLHOSTUSER;
+        password = ConfigActivity.MYSQLHOSTPASSWORD;
+    }
+
+       /*
+       The functions below are mainly from :
+       https://stackoverflow.com/questions/25789245/how-to-get-jsch-shell-command-output-in-string
+       */
+
+    // open the connection using username, password, and hostname
+    public boolean open() throws JSchException {
+
+        JSch jSch = new JSch();
+
+        session = jSch.getSession(username, host, 22);
+        java.util.Properties config = new java.util.Properties();
+        config.put("StrictHostKeyChecking", "no");  // not recommended
+        session.setPassword(password);
+        session.setConfig(config);
+
+
+        Log.d("SSH CONNECT OPEN", "Connecting SSH to " + host + " - Please wait for few seconds... ");
+        session.connect();
+        if (session.isConnected()) {
+            Log.d("SSH CONNECT", "router connected!");
+            return true;
+        } else {
+            Log.d("SSH NOT CONNECT", "router NOT connected!");
+            return false;
+        }
+    }
+
+    // send a command
+    public void runCommand(String command) throws JSchException, IOException {
+
+        if (!session.isConnected())
+            throw new RuntimeException("Not connected to an open session.  Call open() first!");
+
+        channel = session.openChannel("exec");
+        ce = (ChannelExec) channel;
+        ce.setCommand(command);
+        ce.connect();
+        Log.d("SSH RUN COMMAND", command);
+    }
+
+    // get output from a command
+    private List<String> getChannelOutput(Channel channel) throws IOException {
+
+        byte[] buffer = new byte[1024];
+        List<String> output_lines = new ArrayList<String>();
+        try {
+            InputStream in = channel.getInputStream();
+            String line = new String();
+            while (true) {
+                while (in.available() > 0) {
+                    int i = in.read(buffer, 0, 1024);
+                    if (i < 0) {
+                        break;
+                    }
+                    line = new String(buffer, 0, i);
+                    // add the read line to the return value list.
+                    output_lines = new ArrayList(Arrays.asList(line.split("\\n")));
+                }
+
+                if(line.contains("logout")) {
+                    break;
+                }
+                if (channel.isClosed()) {
+                    break;
+                }
+                try {
+                    Thread.sleep(1000);
+                } catch (Exception ee){}
+            }
+        } catch(Exception e) {
+            Log.d("SSH READOUTPUT ERROR", "Error while reading channel output: "+ e);
+        }
+
+        return output_lines;
+    }
+
+
+    /*
+    usage : execute commands through SSH for database MySQL
+    */
+    @Override
+    protected List<String> doInBackground(String... params) {
+
+        String cmd;
+        // Get into the path and create the config file
+        cmd = "cd " + MainActivity.DEF_ADD_DEVICE_TO_MYSQL + ";";
+        cmd = cmd + params[0];
+
+        // now the command is set, so send it.
+        try {
+            // try open the connection
+            if (!open()) {
+                Log.d("SSH CONNECTION CLOSE", "open failed.");
+                return null;
+            }
+            runCommand(cmd);
+            ce.setCommand(cmd);
+            ce.connect();
+        } catch (Exception e) {
+        } // done
+
+        channel.disconnect();
+        return null;
+    }
+
+       /*
+       @Override
+       protected  onPostExecute(Void param) {
+               Log.d("POST", "in post execute");
+       }
+       */
+}
diff --git a/others/lede-gui/src/main/res/layout/activity_add_device.xml b/others/lede-gui/src/main/res/layout/activity_add_device.xml
new file mode 100644 (file)
index 0000000..836322a
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="com.example.lede2.AddDeviceActivity"
+    android:background="@drawable/blueberry"
+    >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true"
+        android:layout_alignParentBottom="true"
+        android:weightSum="1">
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_margin="5dp"
+            android:orientation="vertical"
+            android:weightSum="1"
+            android:layout_weight="0.55">
+
+            <TextView
+                android:id="@+id/textView"
+                android:layout_width="match_parent"
+                android:layout_height="30dp"
+                android:layout_marginTop="10dp"
+                android:layout_weight="0.05"
+                android:background="@drawable/orange"
+                android:gravity="center"
+                android:inputType="text"
+                android:text="Please adjust/modify the MySQL info below"
+                android:textColor="#000000"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="16dp"
+                android:layout_gravity="center"
+                android:orientation="horizontal">
+
+            </LinearLayout>
+
+            <EditText
+
+                android:id="@+id/textInfo"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:layout_weight="0.80"
+                android:background="@drawable/empty"
+                android:gravity="center"
+                android:inputType="text|textMultiLine"
+                android:textColor="@color/colorPrimaryDark"
+                android:textColorLink="@color/blue"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="18dp"
+                android:layout_gravity="center"
+                android:orientation="horizontal">
+
+            </LinearLayout>
+
+            <EditText
+
+                android:id="@+id/textInfoAddress"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@drawable/empty"
+                android:gravity="center"
+                android:inputType="text|textMultiLine"
+                android:textColor="@color/colorPrimaryDark"
+                android:textColorLink="@color/blue"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold"
+                android:layout_weight="0.09" />
+
+            <Button
+                android:id="@+id/doneButton"
+                android:layout_width="150dp"
+                android:layout_height="50dp"
+                android:layout_gravity="center"
+                android:layout_marginTop="50dp"
+                android:layout_weight="0.06"
+                android:background="@drawable/pinkback"
+                android:text="done"
+                android:textColor="#FFA7A7"
+                android:textSize="25dp"
+                android:textStyle="bold" />
+
+
+        </LinearLayout>
+    </LinearLayout>
+
+
+</RelativeLayout>
diff --git a/others/lede-gui/src/main/res/layout/activity_add_relation.xml b/others/lede-gui/src/main/res/layout/activity_add_relation.xml
new file mode 100644 (file)
index 0000000..8454deb
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="com.example.lede2.AddCommActivity"
+    android:background="@drawable/blueberry"
+    >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true"
+        android:layout_alignParentBottom="true"
+        android:weightSum="1">
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_margin="5dp"
+            android:orientation="vertical"
+            android:weightSum="1"
+            android:layout_weight="0.55">
+
+            <TextView
+                android:id="@+id/textView"
+                android:layout_width="match_parent"
+                android:layout_height="30dp"
+                android:layout_marginTop="10dp"
+                android:layout_weight="0.05"
+                android:background="@drawable/orange"
+                android:gravity="center"
+                android:inputType="text"
+                android:text="Please adjust/modify the MySQL info below"
+                android:textColor="#000000"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="16dp"
+                android:layout_gravity="center"
+                android:orientation="horizontal">
+
+            </LinearLayout>
+
+            <EditText
+
+                android:id="@+id/textInfoComm"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:layout_weight="0.80"
+                android:background="@drawable/empty"
+                android:gravity="center"
+                android:inputType="text|textMultiLine"
+                android:textColor="@color/colorPrimaryDark"
+                android:textColorLink="@color/blue"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="18dp"
+                android:layout_gravity="center"
+                android:orientation="horizontal">
+
+            </LinearLayout>
+
+            <Button
+                android:id="@+id/doneButton"
+                android:layout_width="150dp"
+                android:layout_height="50dp"
+                android:layout_gravity="center"
+                android:layout_marginTop="50dp"
+                android:layout_weight="0.06"
+                android:background="@drawable/pinkback"
+                android:text="done"
+                android:textColor="#FFA7A7"
+                android:textSize="25dp"
+                android:textStyle="bold" />
+
+
+        </LinearLayout>
+    </LinearLayout>
+
+
+</RelativeLayout>
index 3e720a6..4098bc0 100644 (file)
@@ -93,7 +93,7 @@
 \r
             <EditText\r
 \r
-                android:id="@+id/ssid"\r
+                android:id="@+id/device_subtype"\r
                 android:layout_width="match_parent"\r
                 android:layout_height="40dp"\r
                 android:background="@drawable/empty"\r
diff --git a/others/lede-gui/src/main/res/layout/activity_delete_device.xml b/others/lede-gui/src/main/res/layout/activity_delete_device.xml
new file mode 100644 (file)
index 0000000..1b0c365
--- /dev/null
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="com.example.lede2.DeleteDeviceActivity"
+    android:background="@drawable/blueberry"
+    >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true"
+        android:weightSum="1">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_margin="5dp"
+            android:orientation="vertical"
+            android:weightSum="1"
+            android:layout_weight="1.86">
+
+            <TextView
+                android:id="@+id/delete_ip"
+                android:layout_width="match_parent"
+                android:layout_height="30dp"
+                android:layout_marginTop="10dp"
+                android:background="@drawable/orange"
+                android:gravity="center"
+                android:inputType="text"
+                android:text="Device ID (e.g. CM1)"
+                android:textColor="#000000"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <EditText
+
+                android:id="@+id/device_id"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:background="@drawable/empty"
+                android:gravity="center"
+                android:inputType="text"
+                android:textColor="@color/colorPrimaryDark"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <TextView
+                android:id="@+id/delete_user"
+                android:layout_width="match_parent"
+                android:layout_height="30dp"
+                android:layout_marginTop="10dp"
+                android:background="@drawable/orange"
+                android:gravity="center"
+                android:inputType="text"
+                android:text="Device type (e.g. Camera)"
+                android:textColor="#000000"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <EditText
+
+                android:id="@+id/device_type"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:background="@drawable/empty"
+                android:gravity="center"
+                android:inputType="text"
+                android:textColor="@color/colorPrimaryDark"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <TextView
+                android:id="@+id/delete_subtype"
+                android:layout_width="match_parent"
+                android:layout_height="30dp"
+                android:layout_marginTop="10dp"
+                android:background="@drawable/orange"
+                android:gravity="center"
+                android:inputType="text"
+                android:text="Device subtype (e.g. AmcrestCamera)"
+                android:textColor="#000000"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <EditText
+
+                android:id="@+id/device_subtype"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:background="@drawable/empty"
+                android:gravity="center"
+                android:inputType="text"
+                android:textColor="@color/colorPrimaryDark"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <TextView
+                android:id="@+id/delete_address_subtype"
+                android:layout_width="match_parent"
+                android:layout_height="30dp"
+                android:layout_marginTop="10dp"
+                android:background="@drawable/orange"
+                android:gravity="center"
+                android:inputType="text"
+                android:text="Device subtype (e.g. AmcrestCameraAdd)"
+                android:textColor="#000000"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <EditText
+
+                android:id="@+id/device_address_subtype"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:background="@drawable/empty"
+                android:gravity="center"
+                android:inputType="text"
+                android:textColor="@color/colorPrimaryDark"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <TextView
+                android:id="@+id/textStatus"
+                android:layout_width="match_parent"
+                android:layout_height="30dp"
+                android:layout_marginTop="10dp"
+                android:background="@drawable/orange"
+                android:gravity="center"
+                android:inputType="text"
+                android:textColor="#000000"
+                android:textIsSelectable="true"
+                android:textSize="17sp"
+                android:textStyle="bold" />
+
+            <Button
+                android:id="@+id/delete"
+                android:layout_width="145dp"
+                android:layout_height="50dp"
+                android:layout_gravity="center"
+                android:layout_marginTop="50dp"
+                android:background="@drawable/pinkback"
+                android:text="delete"
+                android:textColor="#FFA7A7"
+                android:textSize="25dp"
+                android:textStyle="bold" />
+
+            <Button
+                android:id="@+id/done"
+                android:layout_width="150dp"
+                android:layout_height="50dp"
+                android:layout_gravity="center"
+                android:layout_marginTop="50dp"
+                android:layout_weight="0.06"
+                android:background="@drawable/pinkback"
+                android:text="done"
+                android:textColor="#FFA7A7"
+                android:textSize="25dp"
+                android:textStyle="bold" />
+
+
+        </LinearLayout>
+    </LinearLayout>
+
+
+</RelativeLayout>
index 23ff98e..5aee6bf 100644 (file)
@@ -7,15 +7,44 @@
     android:orientation="vertical"\r
     tools:context="com.example.lede2.ListActivity">\r
 \r
-        <ListView\r
-            android:id="@+id/listView1"\r
-            android:layout_width="match_parent"\r
-            android:layout_height="wrap_content"\r
-            android:layout_weight="1"\r
-            android:choiceMode="multipleChoice"\r
-            android:background="@drawable/background"/>\r
-\r
-            <LinearLayout\r
+    <ListView\r
+        android:id="@+id/listView1"\r
+        android:layout_width="match_parent"\r
+        android:layout_height="360dp"\r
+        android:layout_weight="0.18"\r
+        android:background="@drawable/background"\r
+        android:choiceMode="multipleChoice" />\r
+\r
+    <TextView\r
+\r
+        android:id="@+id/txt_ip"\r
+        android:layout_width="match_parent"\r
+        android:layout_height="33dp"\r
+        android:background="@drawable/empty"\r
+        android:gravity="center"\r
+        android:inputType="text"\r
+        android:text="ip"\r
+        android:textColor="@color/colorPrimaryDark"\r
+        android:textIsSelectable="true"\r
+        android:textSize="17sp"\r
+        android:textStyle="bold"\r
+        android:layout_weight="0.00" />\r
+\r
+    <TextView\r
+\r
+        android:id="@+id/txt_mac"\r
+        android:layout_width="match_parent"\r
+        android:layout_height="33dp"\r
+        android:background="@drawable/empty"\r
+        android:gravity="center"\r
+        android:inputType="text"\r
+        android:text="mac"\r
+        android:textColor="@color/colorPrimaryDark"\r
+        android:textIsSelectable="true"\r
+        android:textSize="17sp"\r
+        android:textStyle="bold" />\r
+\r
+    <LinearLayout\r
                 android:layout_width="match_parent"\r
                 android:layout_height="wrap_content"\r
                 android:orientation="horizontal">\r
                     android:layout_width="wrap_content"\r
                     android:layout_height="wrap_content"\r
                     android:layout_weight="1"\r
-                    android:text="Delete"/>\r
+                    android:text="Delete" />\r
 \r
-                <Button\r
-                    android:id="@+id/selectAll"\r
+        <Button\r
+                    android:id="@+id/deviceInfo"\r
                     android:layout_width="wrap_content"\r
                     android:layout_height="wrap_content"\r
                     android:layout_weight="1"\r
-                    android:text="Select All" />\r
+                    android:text="Device Info" />\r
             </LinearLayout>\r
 </LinearLayout>\r
index 8e7836b..0fa8810 100644 (file)
@@ -12,7 +12,7 @@
         android:orientation="vertical"\r
         android:padding="20dp"\r
         android:background="@drawable/blueberry"\r
-        >\r
+        android:weightSum="1">\r
 \r
         <TextView\r
             android:layout_width="match_parent"\r
@@ -28,7 +28,7 @@
             android:layout_height="wrap_content"\r
             android:orientation="horizontal"\r
             android:layout_gravity="center"\r
-            >\r
+            android:layout_weight="0.25">\r
 <LinearLayout\r
     android:layout_width="wrap_content"\r
     android:layout_height="wrap_content"\r
@@ -46,7 +46,7 @@
         />\r
 \r
     <TextView\r
-        android:id="@id/ssid"\r
+        android:id="@id/device_subtype"\r
         android:layout_width="wrap_content"\r
         android:layout_height="wrap_content"\r
         android:layout_marginRight="150dp"\r
 \r
         <Button\r
             android:id="@+id/register"\r
-            android:layout_width="400sp"\r
+            android:layout_width="match_parent"\r
             android:layout_height="50dp"\r
             android:layout_gravity="center"\r
-            android:text="Register Device"\r
+\r
             android:background="@drawable/bluename"\r
-            android:textSize="25dp"\r
-            android:textStyle="bold"\r
-            android:layout_marginTop="100dp"\r
-            android:layout_marginBottom="30dp"/>\r
+            android:text="Register Device"\r
+            android:textSize="25sp"\r
+            android:textStyle="bold" />\r
+\r
+        <LinearLayout\r
+            android:layout_width="match_parent"\r
+            android:layout_height="match_parent"\r
+            android:layout_gravity="center"\r
+            android:layout_weight="0.16"\r
+            android:orientation="horizontal">\r
+\r
+        </LinearLayout>\r
 \r
         <Button\r
             android:id="@+id/list"\r
-            android:layout_width="400dp"\r
+            android:layout_width="match_parent"\r
             android:layout_height="50dp"\r
             android:layout_gravity="center"\r
 \r
+            android:background="@drawable/bluename"\r
             android:text="Device List"\r
+            android:textSize="25sp"\r
+            android:textStyle="bold" />\r
+\r
+        <LinearLayout\r
+            android:layout_width="match_parent"\r
+            android:layout_height="match_parent"\r
+            android:layout_gravity="center"\r
+            android:layout_weight="0.16"\r
+            android:orientation="horizontal">\r
+\r
+        </LinearLayout>\r
+\r
+        <Button\r
+            android:id="@+id/insert_db"\r
+            android:layout_width="match_parent"\r
+            android:layout_height="50dp"\r
+            android:layout_gravity="center"\r
+\r
+            android:background="@drawable/bluename"\r
+            android:text="Insert DB"\r
+            android:textSize="25sp"\r
+            android:textStyle="bold" />\r
+\r
+        <LinearLayout\r
+            android:layout_width="match_parent"\r
+            android:layout_height="match_parent"\r
+            android:layout_gravity="center"\r
+            android:layout_weight="0.16"\r
+            android:orientation="horizontal">\r
+\r
+        </LinearLayout>\r
+\r
+        <Button\r
+            android:id="@+id/delete_db"\r
+            android:layout_width="match_parent"\r
+            android:layout_height="50dp"\r
+            android:layout_gravity="center"\r
+\r
+            android:background="@drawable/bluename"\r
+            android:text="Delete DB"\r
+            android:textSize="25sp"\r
+            android:textStyle="bold" />\r
+\r
+        <LinearLayout\r
+            android:layout_width="match_parent"\r
+            android:layout_height="match_parent"\r
+            android:layout_gravity="center"\r
+            android:layout_weight="0.16"\r
+            android:orientation="horizontal">\r
+\r
+        </LinearLayout>\r
+\r
+        <Button\r
+            android:id="@+id/add_comm"\r
+            android:layout_width="match_parent"\r
+            android:layout_height="50dp"\r
+            android:layout_gravity="center"\r
+\r
             android:background="@drawable/bluename"\r
+            android:text="Add Relation"\r
             android:textSize="25sp"\r
             android:textStyle="bold" />\r
 \r
diff --git a/others/lede-gui/src/main/res/values/attrs.xml b/others/lede-gui/src/main/res/values/attrs.xml
new file mode 100644 (file)
index 0000000..7ce840e
--- /dev/null
@@ -0,0 +1,12 @@
+<resources>
+
+    <!-- Declare custom theme attributes that allow changing which styles are
+         used for button bars depending on the API level.
+         ?android:attr/buttonBarStyle is new as of API 11 so this is
+         necessary to support previous API levels. -->
+    <declare-styleable name="ButtonBarContainerTheme">
+        <attr name="metaButtonBarStyle" format="reference" />
+        <attr name="metaButtonBarButtonStyle" format="reference" />
+    </declare-styleable>
+
+</resources>
index 271d43a..db610ef 100644 (file)
@@ -1,10 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>\r
 <resources>\r
     <color name="colorPrimary">#3F51B5</color>\r
-    <color name="colorPrimaryDark">#303F9F</color>\r
+    <color name="colorPrimaryDark">#303f9f</color>\r
     <color name="colorAccent">#FF4081</color>\r
-    <color name="blue">#00f</color>\r
+    <color name="blue">#0000ff</color>\r
     <color name="mint">#00ffff</color>\r
     <color name="white">#ffffff</color>\r
     <color name="red">#ff00</color>\r
+\r
+    <color name="black_overlay">#66000000</color>\r
 </resources>\r
index 7c3de4a..43d84e6 100644 (file)
@@ -4,7 +4,20 @@
     <string  name="default_rpwd">1qaz2wsx3edc</string>
     <string  name="default_routerip">128.195.204.94</string>
     <string  name="default_routeruser">root</string>
+    <string  name="mysql_hostuser">iotuser</string>
+    <string  name="mysql_hostip">192.168.1.198</string>
+    <string  name="mysql_hostpassword">1qaz2wsx</string>
     <string  name="change_default_script">/root/sentinel_setup/register/change_default_pw.sh</string>
     <string  name="connect_device_script">/root/sentinel_setup/register/connect_device.sh</string>
     <string  name="register_device_script">/root/sentinel_setup/register/register_device.sh</string>
+    <string  name="add_device_file">add_device.config</string>
+    <string  name="add_device_address_file">add_device_address.config</string>
+    <string  name="add_device_comm_file">add_comm.config</string>
+    <string  name="add_device_to_mysql">/home/iotuser/iotjava/iotinstaller</string>
+    <string  name="mysql_config_file">device.config</string>
+    <string  name="install_cmd">java -cp .:..:/usr/share/java/* iotinstaller.IoTInstaller -install_ent</string>
+    <string  name="delete_cmd">java -cp .:..:/usr/share/java/* iotinstaller.IoTInstaller -delete_ent</string>
+    <string  name="install_address_cmd">java -cp .:..:/usr/share/java/* iotinstaller.IoTInstaller -install_dev_add</string>
+    <string  name="delete_address_cmd">java -cp .:..:/usr/share/java/* iotinstaller.IoTInstaller -delete_dev_add</string>
+    <string  name="add_comm_cmd">java -cp .:..:/usr/share/java/* iotinstaller.IoTInstaller -install_comm</string>
 </resources>
\ No newline at end of file
diff --git a/others/lede-gui/src/main/res/values/dimens.xml b/others/lede-gui/src/main/res/values/dimens.xml
new file mode 100644 (file)
index 0000000..59a0b0c
--- /dev/null
@@ -0,0 +1,3 @@
+<resources>
+    <dimen name="fab_margin">16dp</dimen>
+</resources>
index 8823a6c..4b5b802 100644 (file)
@@ -1,8 +1,15 @@
 <resources>\r
     <string name="app_name">LEDE2</string>\r
     <string name="complete">Register complete</string>\r
-    <string name="try_again">Please connect to LEDE2</string>\r
+    <string name="try_again">Please connect to LEDE</string>\r
     <string name="connect">Please connect to WIFI</string>\r
     <string name="empty_name">Name is empty, Please enter the device name</string>\r
     <string name="blank">Please enter information without blank</string>\r
+    <string name="title_activity_add_device_info">AddDeviceInfoActivity</string>\r
+\r
+    <string name="title_activity_add_device">AddDeviceActivity</string>\r
+    <string name="dummy_button">Dummy Button</string>\r
+    <string name="dummy_content">DUMMY\nCONTENT</string>\r
+    <string name="title_activity_delete_device">DeleteDeviceActivity</string>\r
+    <string name="title_activity_add_relation">AddRelationActivity</string>\r
 </resources>\r
index 6f19b47..a8421fe 100644 (file)
@@ -8,4 +8,25 @@
         <item name="colorAccent">@color/colorAccent</item>\r
     </style>\r
 \r
+    <style name="AppTheme.NoActionBar">\r
+        <item name="windowActionBar">false</item>\r
+        <item name="windowNoTitle">true</item>\r
+    </style>\r
+\r
+    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />\r
+\r
+    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />\r
+\r
+    <style name="FullscreenTheme" parent="AppTheme">\r
+        <item name="android:actionBarStyle">@style/FullscreenActionBarStyle</item>\r
+        <item name="android:windowActionBarOverlay">true</item>\r
+        <item name="android:windowBackground">@null</item>\r
+        <item name="metaButtonBarStyle">?android:attr/buttonBarStyle</item>\r
+        <item name="metaButtonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>\r
+    </style>\r
+\r
+    <style name="FullscreenActionBarStyle" parent="Widget.AppCompat.ActionBar">\r
+        <item name="android:background">@color/black_overlay</item>\r
+    </style>\r
+\r
 </resources>\r