private static final String STR_INSTALL_DEV_ADDRESS_CMD = "-install_dev_add";
private static final String STR_INSTALL_ZB_ADDRESS_CMD = "-install_zb_add";
private static final String STR_INSTALL_HOST_CMD = "-install_host";
+ private static final String STR_DELETE_COMMUNICATION_CMD = "-delete_comm";
private static final String STR_DELETE_ENTITY_CMD = "-delete_ent";
private static final String STR_DELETE_ADDRESS_CMD = "-delete_add";
private static final String STR_DELETE_DEV_ADD_CMD = "-delete_dev_add";
}
}
+
+ /**
+ * A method to delete relation/communication information from database
+ *
+ * @param strEntIDSource String for entity ID source
+ * @param strEntIDDest String for entity ID destination
+ * @return void
+ */
+ public void deleteComm(String strEntIDSource, String strEntIDDest) {
+
+ // Delete from table IoTMain
+ tbl.setTableName(STR_COMM_TABLE_NAME);
+ String strWhere = "ID_SOURCE='" + strEntIDSource + "' AND ID_DESTINATION='" + strEntIDDest + "';";
+ tbl.deleteEntry(strWhere);
+ System.out.println("IoTInstaller: Removing relation/communication from table " + STR_COMM_TABLE_NAME);
+ }
/**
* A method to extract device/entity addresses information
System.out.println("IoTInstaller: 6) Install zigbee device address, e.g. java iotinstaller.IoTInstaller -install_zb_add <filename>");
System.out.println("IoTInstaller: 7) Install host, e.g. java iotinstaller.IoTInstaller -install_host <filename>");
System.out.println("IoTInstaller: 8) Delete entity, e.g. java iotinstaller.IoTInstaller -delete_ent <ent_id> <ent_type> <ent_name>");
- System.out.println("IoTInstaller: 9) Delete address, e.g. java iotinstaller.IoTInstaller -delete_add <ent_id> <ent_type>");
- System.out.println("IoTInstaller: 10) Delete device address, e.g. java iotinstaller.IoTInstaller -delete_dev_add <ent_id> <ent_type>");
- System.out.println("IoTInstaller: 11) Delete zigbee device address, e.g. java iotinstaller.IoTInstaller -delete_zb_add <ent_id> <ent_type>");
- System.out.println("IoTInstaller: 12) Delete host, e.g. java iotinstaller.IoTInstaller -delete_host <host_address>");
+ System.out.println("IoTInstaller: 9) Delete comm pattern, e.g. java iotinstaller.IoTInstaller -delete_comm <ent_id_source> <ent_id_dest>");
+ System.out.println("IoTInstaller: 10) Delete address, e.g. java iotinstaller.IoTInstaller -delete_add <ent_id> <ent_type>");
+ System.out.println("IoTInstaller: 11) Delete device address, e.g. java iotinstaller.IoTInstaller -delete_dev_add <ent_id> <ent_type>");
+ System.out.println("IoTInstaller: 12) Delete zigbee device address, e.g. java iotinstaller.IoTInstaller -delete_zb_add <ent_id> <ent_type>");
+ System.out.println("IoTInstaller: 13) Delete host, e.g. java iotinstaller.IoTInstaller -delete_host <host_address>");
System.out.println("IoTInstaller: Type 'java iotinstaller.IoTInstaller -help' to display this help.");
System.out.println();
}
helpTxt = helpTxt + "IoTInstaller: 6) Install zigbee device address, e.g. java iotinstaller.IoTInstaller -install_zb_add <filename>\n";
helpTxt = helpTxt + "IoTInstaller: 7) Install host, e.g. java iotinstaller.IoTInstaller -install_host <filename>\n";
helpTxt = helpTxt + "IoTInstaller: 8) Delete entity, e.g. java iotinstaller.IoTInstaller -delete_ent <ent_id> <ent_type> <ent_name>\n";
- helpTxt = helpTxt + "IoTInstaller: 9) Delete address, e.g. java iotinstaller.IoTInstaller -delete_add <ent_id>\n";
- helpTxt = helpTxt + "IoTInstaller: 10) Delete device address, e.g. java iotinstaller.IoTInstaller -delete_dev_add <ent_id>\n";
- helpTxt = helpTxt + "IoTInstaller: 11) Delete zigbee device address, e.g. java iotinstaller.IoTInstaller -delete_zb_add <ent_id>\n";
- helpTxt = helpTxt + "IoTInstaller: 12) Delete host, e.g. java iotinstaller.IoTInstaller -delete_host <host_address>\n";
+ helpTxt = helpTxt + "IoTInstaller: 9) Delete comm pattern, e.g. java iotinstaller.IoTInstaller -delete_comm <ent_id_source> <ent_id_dest>\n";
+ helpTxt = helpTxt + "IoTInstaller: 10) Delete address, e.g. java iotinstaller.IoTInstaller -delete_add <ent_id>\n";
+ helpTxt = helpTxt + "IoTInstaller: 11) Delete device address, e.g. java iotinstaller.IoTInstaller -delete_dev_add <ent_id>\n";
+ helpTxt = helpTxt + "IoTInstaller: 12) Delete zigbee device address, e.g. java iotinstaller.IoTInstaller -delete_zb_add <ent_id>\n";
+ helpTxt = helpTxt + "IoTInstaller: 13) Delete host, e.g. java iotinstaller.IoTInstaller -delete_host <host_address>\n";
helpTxt = helpTxt + "IoTInstaller: Type 'java iotinstaller.IoTInstaller -help' to display this help.\n";
helpTxt = helpTxt + "\n";
} else if (args[0].equals(STR_DELETE_ENTITY_CMD)) {
iotinst.deleteEntity(args[1], args[2], args[3]);
+ } else if (args[0].equals(STR_DELETE_COMMUNICATION_CMD)) {
+ iotinst.deleteComm(args[1], args[2]);
+
} else if (args[0].equals(STR_DELETE_ADDRESS_CMD)) {
iotinst.deleteAddress(STR_ADDRESS_TABLE_NAME, args[1], args[2]);
</value>
</option>
</component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
</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="366">
- <caret line="63" column="8" selection-start-line="63" selection-start-column="8" selection-end-line="63" selection-end-column="46" />
- <folding />
+ <state relative-caret-position="248">
+ <caret line="81" column="31" selection-start-line="81" selection-start-column="8" selection-end-line="81" selection-end-column="31" />
+ <folding>
+ <element signature="e#4554#4612#0" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
</file>
- <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="525">
- <caret line="51" column="12" selection-start-line="51" selection-start-column="8" selection-end-line="51" selection-end-column="12" />
+ <file leaf-file-name="activity_main.xml" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_main.xml">
+ <provider selected="true" editor-type-id="android-designer2">
+ <state />
+ </provider>
+ <provider editor-type-id="text-editor">
+ <state relative-caret-position="1980">
+ <caret line="132" column="8" selection-start-line="132" selection-start-column="8" selection-end-line="132" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
</file>
- <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">
+ <file leaf-file-name="RelationActivity.java" pinned="false" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/RelationActivity.java">
<provider selected="true" editor-type-id="text-editor">
- <state relative-caret-position="1590">
- <caret line="124" column="30" selection-start-line="124" selection-start-column="30" selection-end-line="124" selection-end-column="30" />
- <folding />
+ <state relative-caret-position="228">
+ <caret line="68" column="21" selection-start-line="68" selection-start-column="21" selection-end-line="68" selection-end-column="21" />
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
</file>
- <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">
+ <file leaf-file-name="SSH_MySQL.java" pinned="false" current-in-tab="false">
+ <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="495">
- <caret line="47" column="8" selection-start-line="47" selection-start-column="8" selection-end-line="47" selection-end-column="8" />
+ <state relative-caret-position="187">
+ <caret line="147" column="58" selection-start-line="147" selection-start-column="35" selection-end-line="147" selection-end-column="58" />
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="activity_add_relation.xml" pinned="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_add_relation.xml">
- <provider editor-type-id="text-editor">
- <state relative-caret-position="1380">
- <caret line="92" column="0" selection-start-line="92" selection-start-column="0" selection-end-line="92" selection-end-column="0" />
+ <file leaf-file-name="constants.xml" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/main/res/values/constants.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="345">
+ <caret line="23" column="12" selection-start-line="23" selection-start-column="12" selection-end-line="23" selection-end-column="12" />
<folding />
</state>
</provider>
+ </entry>
+ </file>
+ <file leaf-file-name="activity_relation.xml" pinned="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_relation.xml">
<provider selected="true" editor-type-id="android-designer2">
<state />
</provider>
- </entry>
- </file>
- <file leaf-file-name="activity_enroll_device.xml" pinned="false" current-in-tab="false">
- <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" />
+ <state relative-caret-position="2460">
+ <caret line="164" column="23" selection-start-line="164" selection-start-column="23" selection-end-line="164" selection-end-column="23" />
<folding />
</state>
</provider>
- <provider selected="true" editor-type-id="android-designer2">
- <state />
+ </entry>
+ </file>
+ <file leaf-file-name="DeleteDeviceActivity.java" pinned="false" current-in-tab="false">
+ <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="-29">
+ <caret line="37" column="0" selection-start-line="37" selection-start-column="0" selection-end-line="38" selection-end-column="51" />
+ <folding />
+ </state>
</provider>
</entry>
</file>
<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/java/com/example/lede2/ListActivity.java" />
<option value="$PROJECT_DIR$/src/main/res/layout/activity_list.xml" />
+ <option value="$PROJECT_DIR$/src/main/res/layout/activity_main.xml" />
+ <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/AddRelationActivity.java" />
+ <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/MainActivity.java" />
+ <option value="$PROJECT_DIR$/src/main/res/layout/activity_relation.xml" />
+ <option value="$PROJECT_DIR$/src/main/res/values/constants.xml" />
+ <option value="$PROJECT_DIR$/src/main/java/com/example/lede2/RelationActivity.java" />
</list>
</option>
</component>
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
- <pane id="AndroidView">
- <subPane />
- </pane>
- <pane id="Scope" />
<pane id="PackagesPane" />
- <pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<PATH>
</PATH>
</subPane>
</pane>
+ <pane id="AndroidView">
+ <subPane />
+ </pane>
+ <pane id="Scratches" />
+ <pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
</component>
<component name="ToolWindowManager">
<frame x="65" y="-4" width="1615" height="1054" extended-state="6" />
- <editor active="true" />
+ <editor active="false" />
<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.28713968" sideWeight="0.45634162" 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="false" show_stripe_button="true" weight="0.28713968" sideWeight="0.44869342" 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="false" show_stripe_button="true" weight="0.2827051" sideWeight="0.49840662" order="7" side_tool="false" 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.2827051" sideWeight="0.5532186" 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.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.135255" sideWeight="0.5436584" order="7" side_tool="true" 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.2827051" sideWeight="0.4467814" 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.48757172" 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.20066519" sideWeight="0.4901211" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="UnknownFeatures">
<watches-manager />
</component>
<component name="editorHistoryManager">
- <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">
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/MySQLInterface.config" />
<entry file="file://$PROJECT_DIR$/src/main/res/layout/content_delete_device.xml" />
- <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/AndroidManifest.xml">
<provider editor-type-id="android-manifest">
<state />
</state>
</provider>
</entry>
- <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="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/res/layout/activity_config.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
</state>
</provider>
</entry>
- <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" />
<entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_add_comm.xml" />
<entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_add_device.xml">
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/AddRelationActivity.java">
+ <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="660">
- <caret line="44" column="18" selection-start-line="44" selection-start-column="18" selection-end-line="44" selection-end-column="18" />
+ <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" />
+ </state>
+ </provider>
+ </entry>
+ <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="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="imports" expanded="false" />
+ <element signature="e#1964#1978#0" 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="262">
- <caret line="132" column="8" selection-start-line="132" selection-start-column="8" selection-end-line="132" selection-end-column="8" />
+ <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" />
+ </state>
+ </provider>
+ </entry>
+ <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 selected="true" editor-type-id="android-designer2">
+ <provider editor-type-id="android-designer2">
<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" />
+ <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/java/com/example/lede2/EnrollDeviceActivity.java">
<provider selected="true" editor-type-id="text-editor">
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/SSH.java">
+ <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="1590">
- <caret line="124" column="30" selection-start-line="124" selection-start-column="30" selection-end-line="124" selection-end-column="30" />
+ <state relative-caret-position="495">
+ <caret line="47" column="8" selection-start-line="47" selection-start-column="8" selection-end-line="47" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/res/values/constants.xml">
- <provider selected="true" editor-type-id="text-editor">
- <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" />
+ <entry file="file://$PROJECT_DIR$/src/main/res/layout/content_relation.xml">
+ <provider selected="true" editor-type-id="android-designer2">
+ <state />
+ </provider>
+ <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>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/ConfigActivity.java">
+ <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_add_relation.xml">
<provider selected="true" editor-type-id="text-editor">
- <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="false" />
- </folding>
+ <state relative-caret-position="606">
+ <caret line="92" column="0" 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/strings.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="105">
- <caret line="7" column="80" selection-start-line="7" selection-start-column="80" selection-end-line="7" selection-end-column="80" />
+ <caret line="19" column="26" selection-start-line="19" selection-start-column="26" selection-end-line="19" selection-end-column="26" />
+ <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/SSH.java">
<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" />
+ <state relative-caret-position="471">
+ <caret line="124" column="30" selection-start-line="124" selection-start-column="30" selection-end-line="124" selection-end-column="30" />
<folding />
</state>
</provider>
- <provider editor-type-id="android-designer2">
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_delete_device.xml">
+ <provider editor-type-id="text-editor">
+ <state relative-caret-position="212">
+ <caret line="68" column="12" selection-start-line="68" selection-start-column="12" selection-end-line="68" selection-end-column="12" />
+ <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/ListActivity.java">
+ <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="495">
- <caret line="47" column="8" selection-start-line="47" selection-start-column="8" selection-end-line="47" selection-end-column="8" />
+ <state relative-caret-position="-29">
+ <caret line="37" column="0" selection-start-line="37" selection-start-column="0" selection-end-line="38" selection-end-column="51" />
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_add_relation.xml">
+ <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_relation.xml">
+ <provider selected="true" editor-type-id="android-designer2">
+ <state />
+ </provider>
<provider editor-type-id="text-editor">
- <state relative-caret-position="1380">
- <caret line="92" column="0" selection-start-line="92" selection-start-column="0" selection-end-line="92" selection-end-column="0" />
+ <state relative-caret-position="2460">
+ <caret line="164" column="23" selection-start-line="164" selection-start-column="23" selection-end-line="164" selection-end-column="23" />
<folding />
</state>
</provider>
- <provider selected="true" editor-type-id="android-designer2">
- <state />
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/main/res/values/constants.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="345">
+ <caret line="23" column="12" selection-start-line="23" selection-start-column="12" selection-end-line="23" selection-end-column="12" />
+ <folding />
+ </state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_enroll_device.xml">
+ <entry file="file://$PROJECT_DIR$/src/main/res/layout/activity_main.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" />
+ <state relative-caret-position="1980">
+ <caret line="132" column="8" selection-start-line="132" selection-start-column="8" selection-end-line="132" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<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="366">
- <caret line="63" column="8" selection-start-line="63" selection-start-column="8" selection-end-line="63" selection-end-column="46" />
+ <state relative-caret-position="248">
+ <caret line="81" column="31" selection-start-line="81" selection-start-column="8" selection-end-line="81" selection-end-column="31" />
+ <folding>
+ <element signature="e#4554#4612#0" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <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="187">
+ <caret line="147" column="58" selection-start-line="147" selection-start-column="35" selection-end-line="147" selection-end-column="58" />
<folding />
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/src/main/java/com/example/lede2/RelationActivity.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state relative-caret-position="228">
+ <caret line="68" column="21" selection-start-line="68" selection-start-column="21" selection-end-line="68" selection-end-column="21" />
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
</component>
</project>
\ No newline at end of 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" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-resources" />
+ <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/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/split-apk" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
+ <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
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:name=".RelationActivity"\r
+ android:label="@string/title_activity_relation"\r
android:theme="@style/AppTheme.NoActionBar"></activity>\r
</application>\r
\r
+++ /dev/null
-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);
- }
- }
-
-}
protected static String DEF_INSTALL_ADDRESS_CMD;\r
protected static String DEF_DELETE_ADDRESS_CMD;\r
protected static String DEF_INSTALL_RELATION_CMD;\r
+ protected static String DEF_DELETE_RELATION_CMD;\r
\r
@Override\r
protected void onCreate(Bundle savedInstanceState) {\r
insertDBButton = (Button) findViewById(R.id.insert_db);\r
deleteDBButton = (Button) findViewById(R.id.delete_db);\r
configButton = (Button) findViewById(R.id.config);\r
- relationButton = (Button) findViewById(R.id.add_comm);\r
+ relationButton = (Button) findViewById(R.id.add_del_comm);\r
ssid = (TextView)findViewById(R.id.device_subtype);\r
\r
registerButton.setOnClickListener(this);\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
+ DEF_DELETE_RELATION_CMD = context.getResources().getString(R.string.delete_comm_cmd);\r
ssid.setText(DEF_RSSID);\r
}\r
\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
+ startActivity(new Intent(this, RelationActivity.class));\r
}\r
}\r
}\r
--- /dev/null
+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 java.io.IOException;
+import java.io.InputStream;
+
+public class RelationActivity extends AppCompatActivity implements View.OnClickListener,View.OnFocusChangeListener {
+
+ Button addButton;
+ Button deleteButton;
+ EditText databaseInfo;
+ EditText idSource;
+ EditText idDestination;
+ private SSH_MySQL ssh;//Connection object between Android & Host
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_relation);
+
+ addButton = (Button) findViewById(R.id.addButton);
+ deleteButton = (Button) findViewById(R.id.delButton);
+ databaseInfo = (EditText)findViewById(R.id.textInfoComm);
+ idSource = (EditText)findViewById(R.id.id_source);
+ idDestination = (EditText)findViewById(R.id.id_destination);
+
+ addButton.setOnClickListener(this);
+ deleteButton.setOnClickListener(this);
+ databaseInfo.setOnFocusChangeListener(this);
+ idSource.setOnFocusChangeListener(this);
+ idDestination.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 == addButton){
+ // 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();
+ }
+ if(v == deleteButton){
+ // Delete a communication/relation entry
+ ssh.execute(MainActivity.DEF_DELETE_RELATION_CMD + " " + idSource.getText().toString()
+ + " " + idDestination.getText().toString());
+ 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);
+ }
+ }
+
+}
+++ /dev/null
-<?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>
</LinearLayout>\r
\r
<Button\r
- android:id="@+id/add_comm"\r
+ android:id="@+id/add_del_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:text="Add/Delete Relation"\r
android:textSize="25sp"\r
android:textStyle="bold" />\r
\r
--- /dev/null
+<?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.RelationActivity"
+ 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:layout_weight="0.55"
+ android:orientation="vertical"
+ android:weightSum="1">
+
+ <TextView
+ android:id="@+id/textView2"
+ 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 the info below to add a relation"
+ 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="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" />
+
+ <Button
+ android:id="@+id/addButton"
+ 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="add"
+ android:textColor="#FFA7A7"
+ android:textSize="25dp"
+ android:textStyle="bold" />
+
+ <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 provide entry IDs to delete a relation"
+ android:textColor="#000000"
+ android:textIsSelectable="true"
+ android:textSize="17sp"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/textView3"
+ 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="ID source"
+ android:textColor="#000000"
+ android:textIsSelectable="true"
+ android:textSize="17sp"
+ android:textStyle="bold" />
+
+ <EditText
+
+ android:id="@+id/id_source"
+ android:layout_width="match_parent"
+ android:layout_height="40dp"
+ android:layout_weight="0.05"
+ 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/textView4"
+ 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="ID destination"
+ android:textColor="#000000"
+ android:textIsSelectable="true"
+ android:textSize="17sp"
+ android:textStyle="bold" />
+
+ <EditText
+
+ android:id="@+id/id_destination"
+ android:layout_width="match_parent"
+ android:layout_height="40dp"
+ android:layout_weight="0.05"
+ android:background="@drawable/empty"
+ android:gravity="center"
+ android:inputType="text"
+ android:textColor="@color/colorPrimaryDark"
+ android:textIsSelectable="true"
+ android:textSize="17sp"
+ android:textStyle="bold" />
+
+ <Button
+ android:id="@+id/delButton"
+ android:layout_width="154dp"
+ 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" />
+
+
+ </LinearLayout>
+ </LinearLayout>
+
+
+</RelativeLayout>
<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="add_device_to_mysql">/home/iotuser/iot2/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>
+ <string name="delete_comm_cmd">java -cp .:..:/usr/share/java/* iotinstaller.IoTInstaller -delete_comm</string>
</resources>
\ No newline at end of file
<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
+ <string name="title_activity_relation">RelationActivity</string>\r
</resources>\r