ameba micropython sdk first commit

This commit is contained in:
xidameng 2020-07-31 22:16:12 +08:00
commit 8508ee6139
5619 changed files with 1874619 additions and 0 deletions

Binary file not shown.

View file

@ -0,0 +1 @@
#Wed May 18 16:41:20 CST 2016

View file

@ -0,0 +1 @@
#Thu Aug 20 15:17:13 CST 2015

View file

@ -0,0 +1 @@
UART_Adapter

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>

View file

@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="" />
</component>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="myModules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

View file

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="android-android-20">
<CLASSES>
<root url="jar://$USER_HOME$/AppData/Local/Android/sdk/platforms/android-20/android.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View file

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="support-annotations-20.0.0">
<CLASSES>
<root url="jar://$USER_HOME$/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/20.0.0/support-annotations-20.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/20.0.0/support-annotations-20.0.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="support-v4-20.0.0">
<CLASSES>
<root url="jar://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.android.support/support-v4/20.0.0/jars/classes.jar!/" />
<root url="jar://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.android.support/support-v4/20.0.0/jars/libs/internal_impl-20.0.0.jar!/" />
<root url="file://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.android.support/support-v4/20.0.0/res" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/20.0.0/support-v4-20.0.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View file

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>Android API 17 Platform</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/UART_Adapter.iml" filepath="$PROJECT_DIR$/UART_Adapter.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
</project>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="UART_Adapter" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
<option name="BUILDABLE" value="false" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="UART_Adapter" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":app" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<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/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" 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/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<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/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/20.0.0/jars" />
<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-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" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<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 20 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-annotations-20.0.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-20.0.0" level="project" />
<orderEntry type="library" exported="" name="android-android-20" level="project" />
</component>
</module>

View file

@ -0,0 +1,23 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.realtek.uartthrough"
minSdkVersion 15
targetSdkVersion 19
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:20.0.0'
}

View file

@ -0,0 +1,13 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.realtek.uartthrough.test;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.realtek.uartthrough.test";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = -1;
public static final String VERSION_NAME = "";
}

View file

@ -0,0 +1,13 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.realtek.uartthrough;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.realtek.uartthrough";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0.3.20161221.a";
}

View file

@ -0,0 +1,98 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.realtek.uartthrough;
public final class R {
public static final class attr {
}
public static final class dimen {
public static final int activity_horizontal_margin=0x7f050000;
public static final int activity_vertical_margin=0x7f050001;
}
public static final class drawable {
public static final int add=0x7f020000;
public static final int ameba_group=0x7f020001;
public static final int back=0x7f020002;
public static final int bg_index01=0x7f020003;
public static final int bg_index1=0x7f020004;
public static final int device=0x7f020005;
public static final int ic_launcher=0x7f020006;
public static final int logo=0x7f020007;
public static final int logo1=0x7f020008;
public static final int search=0x7f020009;
public static final int setting=0x7f02000a;
public static final int ungroup=0x7f02000b;
}
public static final class id {
public static final int APPTitle=0x7f080003;
public static final int APPimageView=0x7f08000c;
public static final int action_settings=0x7f08001f;
public static final int btn_back=0x7f080002;
public static final int btn_scanDevices=0x7f08000e;
public static final int btn_send=0x7f080009;
public static final int btn_setting=0x7f08000d;
public static final int btn_setting_apply=0x7f08001e;
public static final int btn_setting_cancel=0x7f080018;
public static final int btn_setting_ungroup=0x7f080017;
public static final int chatDisplay=0x7f080006;
public static final int chat_ScrollView=0x7f080005;
public static final int debugLayout=0x7f08000a;
public static final int editTx_send=0x7f080008;
public static final int gridview_list=0x7f08000f;
public static final int item_image=0x7f080010;
public static final int item_text=0x7f080011;
public static final int item_text_info=0x7f080012;
public static final int layer1_linear0=0x7f080001;
public static final int layer1_linear2=0x7f080004;
public static final int layer1_linear3=0x7f080007;
public static final int layout_setting=0x7f080013;
public static final int mainlayout=0x7f080000;
public static final int settingImage=0x7f080014;
public static final int spinner_baudrate=0x7f080019;
public static final int spinner_data=0x7f08001a;
public static final int spinner_flowcontrol=0x7f08001d;
public static final int spinner_parity=0x7f08001b;
public static final int spinner_stopbit=0x7f08001c;
public static final int text_test=0x7f08000b;
public static final int unGroupImage=0x7f080015;
public static final int unGrouptBtn=0x7f080016;
}
public static final class layout {
public static final int activity_chat=0x7f030000;
public static final int activity_main=0x7f030001;
public static final int layout_item=0x7f030002;
public static final int layout_item_setting=0x7f030003;
public static final int layout_popmenu=0x7f030004;
public static final int setting_group=0x7f030005;
public static final int setting_serialport=0x7f030006;
}
public static final class menu {
public static final int chat=0x7f070000;
public static final int main=0x7f070001;
}
public static final class string {
public static final int action_settings=0x7f060000;
public static final int app_name=0x7f060001;
public static final int hello_world=0x7f060002;
public static final int title_activity_chat=0x7f060003;
}
public static final class style {
/** API 11 theme customizations can go here.
API 14 theme customizations can go here.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
*/
public static final int AppBaseTheme=0x7f040000;
/** All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f040001;
}
}

View file

@ -0,0 +1,28 @@
[
{
"outputFile": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\values-v11\\values-v11.xml",
"map": [
{
"to": {
"startLine": 2,
"startColumn": 4,
"startOffset": 55,
"endLine": 4,
"endColumn": 12,
"endOffset": 187
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values-v11\\styles.xml",
"position": {
"startLine": 6,
"startColumn": 4,
"startOffset": 182,
"endLine": 8,
"endColumn": 12,
"endOffset": 316
}
}
}
]
}
]

View file

@ -0,0 +1,28 @@
[
{
"outputFile": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\values-v14\\values-v14.xml",
"map": [
{
"to": {
"startLine": 2,
"startColumn": 4,
"startOffset": 55,
"endLine": 4,
"endColumn": 12,
"endOffset": 201
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values-v14\\styles.xml",
"position": {
"startLine": 7,
"startColumn": 4,
"startOffset": 225,
"endLine": 9,
"endColumn": 12,
"endOffset": 373
}
}
}
]
}
]

View file

@ -0,0 +1,26 @@
[
{
"outputFile": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\values-w820dp-v13\\values-w820dp-v13.xml",
"map": [
{
"to": {
"startLine": 2,
"startColumn": 4,
"startOffset": 55,
"endColumn": 57,
"endOffset": 108
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values-w820dp\\dimens.xml",
"position": {
"startLine": 7,
"startColumn": 4,
"startOffset": 310,
"endColumn": 57,
"endOffset": 363
}
}
}
]
}
]

View file

@ -0,0 +1,163 @@
[
{
"outputFile": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\values\\values.xml",
"map": [
{
"to": {
"startLine": 2,
"startColumn": 4,
"startOffset": 55,
"endColumn": 57,
"endOffset": 108
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values\\dimens.xml",
"position": {
"startLine": 3,
"startColumn": 4,
"startOffset": 92,
"endColumn": 57,
"endOffset": 145
}
}
},
{
"to": {
"startLine": 3,
"startColumn": 4,
"startOffset": 113,
"endColumn": 55,
"endOffset": 164
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values\\dimens.xml",
"position": {
"startLine": 4,
"startColumn": 4,
"startOffset": 151,
"endColumn": 55,
"endOffset": 202
}
}
},
{
"to": {
"startLine": 4,
"startColumn": 4,
"startOffset": 169,
"endColumn": 52,
"endOffset": 217
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values\\strings.xml",
"position": {
"startLine": 4,
"startColumn": 4,
"startOffset": 109,
"endColumn": 52,
"endOffset": 157
}
}
},
{
"to": {
"startLine": 5,
"startColumn": 4,
"startOffset": 222,
"endColumn": 48,
"endOffset": 266
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values\\strings.xml",
"position": {
"startLine": 3,
"startColumn": 4,
"startOffset": 59,
"endColumn": 48,
"endOffset": 103
}
}
},
{
"to": {
"startLine": 6,
"startColumn": 4,
"startOffset": 271,
"endColumn": 52,
"endOffset": 319
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values\\strings.xml",
"position": {
"startLine": 5,
"startColumn": 4,
"startOffset": 163,
"endColumn": 52,
"endOffset": 211
}
}
},
{
"to": {
"startLine": 7,
"startColumn": 4,
"startOffset": 324,
"endColumn": 60,
"endOffset": 380
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values\\strings.xml",
"position": {
"startLine": 6,
"startColumn": 4,
"startOffset": 217,
"endColumn": 60,
"endOffset": 273
}
}
},
{
"to": {
"startLine": 8,
"startColumn": 4,
"startOffset": 385,
"endLine": 14,
"endColumn": 12,
"endOffset": 671
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values\\styles.xml",
"position": {
"startLine": 6,
"startColumn": 4,
"startOffset": 191,
"endLine": 12,
"endColumn": 12,
"endOffset": 481
}
}
},
{
"to": {
"startLine": 15,
"startColumn": 4,
"startOffset": 676,
"endLine": 17,
"endColumn": 12,
"endOffset": 831
},
"from": {
"file": "E:\\UART_Adapter\\app\\src\\main\\res\\values\\styles.xml",
"position": {
"startLine": 15,
"startColumn": 4,
"startOffset": 522,
"endLine": 17,
"endColumn": 12,
"endOffset": 679
}
}
}
]
}
]

View file

@ -0,0 +1,6 @@
[
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable-hdpi-v4\\ic_launcher.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable-hdpi\\ic_launcher.png"
}
]

View file

@ -0,0 +1,6 @@
[
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable-mdpi-v4\\ic_launcher.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable-mdpi\\ic_launcher.png"
}
]

View file

@ -0,0 +1,6 @@
[
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable-xhdpi-v4\\ic_launcher.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable-xhdpi\\ic_launcher.png"
}
]

View file

@ -0,0 +1,6 @@
[
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable-xxhdpi-v4\\ic_launcher.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable-xxhdpi\\ic_launcher.png"
}
]

View file

@ -0,0 +1,46 @@
[
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\logo.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\logo.png"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\add.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\add.png"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\bg_index01.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\bg_index01.png"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\search.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\search.png"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\logo1.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\logo1.png"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\ameba_group.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\ameba_group.png"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\setting.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\setting.png"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\ungroup.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\ungroup.png"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\back.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\back.png"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\device.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\device.png"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\drawable\\bg_index1.png",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\drawable\\bg_index1.png"
}
]

View file

@ -0,0 +1,30 @@
[
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\layout\\layout_popmenu.xml",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\layout\\layout_popmenu.xml"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\layout\\setting_serialport.xml",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\layout\\setting_serialport.xml"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\layout\\layout_item.xml",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\layout\\layout_item.xml"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\layout\\layout_item_setting.xml",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\layout\\layout_item_setting.xml"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\layout\\activity_chat.xml",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\layout\\activity_chat.xml"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\layout\\activity_main.xml",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\layout\\activity_main.xml"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\layout\\setting_group.xml",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\layout\\setting_group.xml"
}
]

View file

@ -0,0 +1,10 @@
[
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\menu\\main.xml",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\menu\\main.xml"
},
{
"merged": "E:\\UART_Adapter\\app\\build\\intermediates\\res\\merged\\debug\\menu\\chat.xml",
"source": "E:\\UART_Adapter\\app\\src\\main\\res\\menu\\chat.xml"
}
]

View file

@ -0,0 +1,18 @@
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="android.support.v4">
<uses-sdk android:minSdkVersion="4"/>
<application/>
</manifest>

View file

@ -0,0 +1,42 @@
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.support.v4.app;
import android.app.Notification;
/**
* Interface used for delivering notifications via a side channel that bypasses
* the NotificationManagerService.
*
* @hide
*/
oneway interface INotificationSideChannel {
/**
* Send an ambient notification to the service.
*/
void notify(String packageName, int id, String tag, in Notification notification);
/**
* Cancel an already-notified notification.
*/
void cancel(String packageName, int id, String tag);
/**
* Cancel all notifications for the given package.
*/
void cancelAll(String packageName);
}

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main"><source path="E:\UART_Adapter\app\src\androidTest\assets"/><source path="E:\UART_Adapter\app\build\generated\assets\shaders\androidTest\debug"/></dataSet></merger>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main$Generated" generated="true"><source path="E:\UART_Adapter\app\src\androidTest\res"/><source path="E:\UART_Adapter\app\build\generated\res\rs\androidTest\debug"/><source path="E:\UART_Adapter\app\build\generated\res\resValues\androidTest\debug"/></dataSet><dataSet config="main" generated-set="main$Generated"><source path="E:\UART_Adapter\app\src\androidTest\res"/><source path="E:\UART_Adapter\app\build\generated\res\rs\androidTest\debug"/><source path="E:\UART_Adapter\app\build\generated\res\resValues\androidTest\debug"/></dataSet><mergedItems/></merger>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main"><source path="E:\UART_Adapter\app\src\androidTest\shaders"/></dataSet></merger>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="20.0.0"><source path="E:\UART_Adapter\app\build\intermediates\exploded-aar\com.android.support\support-v4\20.0.0\assets"/></dataSet><dataSet config="main"><source path="E:\UART_Adapter\app\src\main\assets"/><source path="E:\UART_Adapter\app\build\generated\assets\shaders\debug"/></dataSet><dataSet config="debug"><source path="E:\UART_Adapter\app\src\debug\assets"/></dataSet></merger>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="20.0.0$Generated" generated="true"><source path="E:\UART_Adapter\app\build\intermediates\exploded-aar\com.android.support\support-v4\20.0.0\res"/></dataSet><dataSet config="main$Generated" generated="true"><source path="E:\UART_Adapter\app\src\main\res"/><source path="E:\UART_Adapter\app\build\generated\res\rs\debug"/><source path="E:\UART_Adapter\app\build\generated\res\resValues\debug"/></dataSet><dataSet config="debug$Generated" generated="true"><source path="E:\UART_Adapter\app\src\debug\res"/></dataSet><dataSet config="20.0.0" from-dependency="true" generated-set="20.0.0$Generated"><source path="E:\UART_Adapter\app\build\intermediates\exploded-aar\com.android.support\support-v4\20.0.0\res"/></dataSet><dataSet config="main" generated-set="main$Generated"><source path="E:\UART_Adapter\app\src\main\res"><file name="add" path="E:\UART_Adapter\app\src\main\res\drawable\add.png" qualifiers="" type="drawable"/><file name="ameba_group" path="E:\UART_Adapter\app\src\main\res\drawable\ameba_group.png" qualifiers="" type="drawable"/><file name="back" path="E:\UART_Adapter\app\src\main\res\drawable\back.png" qualifiers="" type="drawable"/><file name="bg_index01" path="E:\UART_Adapter\app\src\main\res\drawable\bg_index01.png" qualifiers="" type="drawable"/><file name="bg_index1" path="E:\UART_Adapter\app\src\main\res\drawable\bg_index1.png" qualifiers="" type="drawable"/><file name="device" path="E:\UART_Adapter\app\src\main\res\drawable\device.png" qualifiers="" type="drawable"/><file name="logo" path="E:\UART_Adapter\app\src\main\res\drawable\logo.png" qualifiers="" type="drawable"/><file name="logo1" path="E:\UART_Adapter\app\src\main\res\drawable\logo1.png" qualifiers="" type="drawable"/><file name="search" path="E:\UART_Adapter\app\src\main\res\drawable\search.png" qualifiers="" type="drawable"/><file name="setting" path="E:\UART_Adapter\app\src\main\res\drawable\setting.png" qualifiers="" type="drawable"/><file name="ungroup" path="E:\UART_Adapter\app\src\main\res\drawable\ungroup.png" qualifiers="" type="drawable"/><file name="ic_launcher" path="E:\UART_Adapter\app\src\main\res\drawable-hdpi\ic_launcher.png" qualifiers="hdpi-v4" type="drawable"/><file name="ic_launcher" path="E:\UART_Adapter\app\src\main\res\drawable-mdpi\ic_launcher.png" qualifiers="mdpi-v4" type="drawable"/><file name="ic_launcher" path="E:\UART_Adapter\app\src\main\res\drawable-xhdpi\ic_launcher.png" qualifiers="xhdpi-v4" type="drawable"/><file name="ic_launcher" path="E:\UART_Adapter\app\src\main\res\drawable-xxhdpi\ic_launcher.png" qualifiers="xxhdpi-v4" type="drawable"/><file name="activity_chat" path="E:\UART_Adapter\app\src\main\res\layout\activity_chat.xml" qualifiers="" type="layout"/><file name="activity_main" path="E:\UART_Adapter\app\src\main\res\layout\activity_main.xml" qualifiers="" type="layout"/><file name="layout_item" path="E:\UART_Adapter\app\src\main\res\layout\layout_item.xml" qualifiers="" type="layout"/><file name="layout_item_setting" path="E:\UART_Adapter\app\src\main\res\layout\layout_item_setting.xml" qualifiers="" type="layout"/><file name="layout_popmenu" path="E:\UART_Adapter\app\src\main\res\layout\layout_popmenu.xml" qualifiers="" type="layout"/><file name="setting_group" path="E:\UART_Adapter\app\src\main\res\layout\setting_group.xml" qualifiers="" type="layout"/><file name="setting_serialport" path="E:\UART_Adapter\app\src\main\res\layout\setting_serialport.xml" qualifiers="" type="layout"/><file name="chat" path="E:\UART_Adapter\app\src\main\res\menu\chat.xml" qualifiers="" type="menu"/><file name="main" path="E:\UART_Adapter\app\src\main\res\menu\main.xml" qualifiers="" type="menu"/><file path="E:\UART_Adapter\app\src\main\res\values\dimens.xml" qualifiers=""><dimen name="activity_horizontal_margin">16dp</dimen><dimen name="activity_vertical_margin">16dp</dimen></file><file path="E:\UART_Adapter\app\src\main\res\values\strings.xml" qualifiers=""><string name="title_activity_chat">ChatActivity</string><string name="action_settings">Settings</string><string name="app_name">UartThrough</string><string name="hello_world">Hello world!</string></file><file path="E:\UART_Adapter\app\src\main\res\values\styles.xml" qualifiers=""><style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style><style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style></file><file path="E:\UART_Adapter\app\src\main\res\values-v11\styles.xml" qualifiers="v11"><style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style></file><file path="E:\UART_Adapter\app\src\main\res\values-v14\styles.xml" qualifiers="v14"><style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style></file><file path="E:\UART_Adapter\app\src\main\res\values-w820dp\dimens.xml" qualifiers="w820dp-v13"><dimen name="activity_horizontal_margin">64dp</dimen></file></source><source path="E:\UART_Adapter\app\build\generated\res\rs\debug"/><source path="E:\UART_Adapter\app\build\generated\res\resValues\debug"/></dataSet><dataSet config="debug" generated-set="debug$Generated"><source path="E:\UART_Adapter\app\src\debug\res"/></dataSet><mergedItems/></merger>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main"><source path="E:\UART_Adapter\app\src\main\shaders"/></dataSet><dataSet config="debug"><source path="E:\UART_Adapter\app\src\debug\shaders"/></dataSet></merger>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.realtek.uartthrough.test">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="19" />
<application>
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.realtek.uartthrough"
android:handleProfiling="false"
android:functionalTest="false"
android:label="Tests for com.realtek.uartthrough"/>
</manifest>

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.realtek.uartthrough"
android:versionCode="1"
android:versionName="1.0.3.20161221.a" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="19" />
<uses-permission
android:name="android.permission.ACCESS_WIFI_STATE"
android:required="true" />
<uses-permission
android:name="android.permission.CHANGE_WIFI_STATE"
android:required="true" />
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"
android:required="true" />
<uses-permission
android:name="android.permission.INTERNET"
android:required="true" />
<uses-permission
android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"
android:required="true" />
<uses-permission
android:name="android.permission.CHANGE_NETWORK_STATE"
android:required="true" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.realtek.uartthrough.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.realtek.uartthrough.ChatActivity"
android:label="@string/title_activity_chat" >
</activity>
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

View file

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/mainlayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/layer1_linear0"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:background="@drawable/bg_index01"
android:layout_weight="1">
<ImageButton
android:id="@+id/btn_back"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:padding="2dp"
android:src="@drawable/back"/>
<TextView
android:id="@+id/APPTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center"
android:layout_weight="1.75"
android:gravity="left"
android:paddingLeft="20dp"
android:text="Let us just chat"
android:textColor="@android:color/black"
android:textSize="20sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/layer1_linear2"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:background="@drawable/bg_index1"
android:layout_weight="8">
<ScrollView
android:id="@+id/chat_ScrollView"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="#ffeeeeee"
android:fillViewport="false" >
<TextView
android:id="@+id/chatDisplay"
android:text=""
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14dp"
android:background="#ffffffff"
android:focusable="true"
android:focusableInTouchMode="true"/>
</ScrollView>
</LinearLayout>
<LinearLayout
android:id="@+id/layer1_linear3"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal" >
<EditText
android:id="@+id/editTx_send"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="0.52"
android:clickable="true"
android:ems="10"
android:enabled="true"
android:text=""
android:textSize="14dp" />
<Button
android:id="@+id/btn_send"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="Send" />
</LinearLayout>
<LinearLayout
android:id="@+id/debugLayout"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:background="#FFFFFF"
android:layout_weight="0">
<TextView
android:id="@+id/text_test"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text=""
android:textSize="12sp"
android:maxLines = "9999999"
android:scrollbars = "vertical"/>
</LinearLayout>
</LinearLayout>

View file

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/mainlayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/layer1_linear0"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:orientation="horizontal"
android:background="@drawable/bg_index01"
android:layout_weight="1">
<ImageView
android:id="@+id/APPimageView"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:padding="2dp"
android:src="@drawable/logo"/>
<TextView
android:id="@+id/APPTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center"
android:layout_weight="3"
android:gravity="left"
android:paddingLeft="60dp"
android:text="Uart Through"
android:textColor="@android:color/black"
android:textSize="16sp" />
<ImageButton
android:id="@+id/btn_setting"
android:contentDescription="@string/app_name"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:padding="5dp"
android:layout_margin= "1dp"
android:src="@drawable/setting"
android:visibility="invisible"/>
<ImageButton
android:id="@+id/btn_scanDevices"
android:contentDescription="@string/app_name"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:padding="5dp"
android:layout_margin= "1dp"
android:src="@drawable/search"/>
<!--ImageButton
android:id="@+id/btn_addDevice"
android:contentDescription="@string/app_name"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:padding="5dp"
android:layout_margin= "1dp"
android:src="@drawable/add"/-->
</LinearLayout>
<LinearLayout
android:id="@+id/layer1_linear2"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:background="@drawable/bg_index1"
android:layout_weight="8">
<GridView
android:id="@+id/gridview_list"
android:listSelector="@android:color/transparent"
android:cacheColorHint="@android:color/transparent"
android:numColumns="2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="35dp"
android:gravity="center"
android:layout_gravity="center"
android:columnWidth="50pt"
android:stretchMode="columnWidth"
android:focusable="false"
android:focusableInTouchMode="false"/>
</LinearLayout>
</LinearLayout>

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent" >
<ImageView
android:id="@+id/item_image"
android:scaleType="centerCrop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true" >
</ImageView>
<TextView
android:id="@+id/item_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/item_image"
android:layout_centerHorizontal="true"
android:background="#22000000"
android:textSize="12sp"
android:ellipsize="middle"
android:singleLine="true"
android:maxEms="10"
>
</TextView>
<!-- com.realtek.myspeaker.SpeakerTextView
android:id="@+id/item_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/item_image"
android:layout_centerHorizontal="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:marqueeRepeatLimit="marquee_forever">
</com.realtek.myspeaker.SpeakerTextView-->
</RelativeLayout>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent" >
<ImageView
android:id="@+id/item_image"
android:scaleType="centerCrop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true" >
</ImageView>
<TextView
android:id="@+id/item_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/item_image"
android:layout_centerHorizontal="true"
android:textSize="16sp"
>
</TextView>
<TextView
android:id="@+id/item_text_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/item_text"
android:layout_centerHorizontal="true"
android:textSize="14sp"
>
</TextView>
<!-- com.realtek.myspeaker.SpeakerTextView
android:id="@+id/item_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/item_image"
android:layout_centerHorizontal="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:marqueeRepeatLimit="marquee_forever">
</com.realtek.myspeaker.SpeakerTextView-->
</RelativeLayout>

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<LinearLayout
android:id="@+id/layout_setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/darker_gray"
android:orientation="horizontal">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:id="@+id/settingImage"
android:src="@drawable/setting" />
<Button android:id="@+id/btn_setting"
android:text="Setting"
android:layout_width="100dp"
android:layout_height="40dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/darker_gray"
android:orientation="horizontal">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:id="@+id/unGroupImage"
android:src="@drawable/ungroup" />
<Button
android:id="@+id/unGrouptBtn"
android:layout_width="100dp"
android:layout_height="40dp"
android:text="UnGroup" />
</LinearLayout>
<!-- android:focusable="false"
android:visibility="invisible"-->
</LinearLayout>

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/background_light"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:background="@android:color/darker_gray"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_margin="1dp"
android:layout_gravity="center"
android:background="@android:color/darker_gray"
android:orientation="horizontal">
<Button
android:id="@+id/btn_setting_ungroup"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Ungroup" />
<Button
android:id="@+id/btn_setting_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Cancel" />"
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -0,0 +1,179 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/background_light"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:background="@android:color/darker_gray"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_margin="1dp"
android:layout_gravity="center"
android:background="@android:color/darker_gray"
android:orientation="horizontal">
<!-- ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_gravity="center_vertical|center"
android:layout_weight="1"
android:src="@drawable/ic_launcher" /-->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center"
android:layout_weight="3"
android:text="Serial Port Setup" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_margin="1dp"
android:background="@android:color/darker_gray"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center"
android:layout_weight="3"
android:text="Baud Rate" />
<Spinner
android:id="@+id/spinner_baudrate"
android:spinnerMode="dialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_margin="1dp"
android:background="@android:color/darker_gray"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center"
android:layout_weight="3"
android:text="Data Bit" />
<Spinner
android:id="@+id/spinner_data"
android:spinnerMode="dialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_margin="1dp"
android:background="@android:color/darker_gray"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center"
android:text="Parity Bit" />
<Spinner
android:id="@+id/spinner_parity"
android:spinnerMode="dialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_margin="1dp"
android:background="@android:color/darker_gray"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center"
android:layout_weight="3"
android:text="Stop Bit" />
<Spinner
android:id="@+id/spinner_stopbit"
android:spinnerMode="dialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_margin="1dp"
android:background="@android:color/darker_gray"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center"
android:text="Flow Control" />
<Spinner
android:id="@+id/spinner_flowcontrol"
android:spinnerMode="dialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="2"
android:layout_margin="1dp"
android:layout_gravity="center"
android:background="@android:color/darker_gray"
android:orientation="horizontal">
<Button
android:id="@+id/btn_setting_cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Cancel" />"
<Button
android:id="@+id/btn_setting_apply"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Apply" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -0,0 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>

View file

@ -0,0 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
</menu>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
</resources>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<string name="action_settings">Settings</string>
<string name="app_name">UartThrough</string>
<string name="hello_world">Hello world!</string>
<string name="title_activity_chat">ChatActivity</string>
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>

View file

@ -0,0 +1,61 @@
int dimen activity_horizontal_margin 0x7f050000
int dimen activity_vertical_margin 0x7f050001
int drawable add 0x7f020000
int drawable ameba_group 0x7f020001
int drawable back 0x7f020002
int drawable bg_index01 0x7f020003
int drawable bg_index1 0x7f020004
int drawable device 0x7f020005
int drawable ic_launcher 0x7f020006
int drawable logo 0x7f020007
int drawable logo1 0x7f020008
int drawable search 0x7f020009
int drawable setting 0x7f02000a
int drawable ungroup 0x7f02000b
int id APPTitle 0x7f080003
int id APPimageView 0x7f08000c
int id action_settings 0x7f08001f
int id btn_back 0x7f080002
int id btn_scanDevices 0x7f08000e
int id btn_send 0x7f080009
int id btn_setting 0x7f08000d
int id btn_setting_apply 0x7f08001e
int id btn_setting_cancel 0x7f080018
int id btn_setting_ungroup 0x7f080017
int id chatDisplay 0x7f080006
int id chat_ScrollView 0x7f080005
int id debugLayout 0x7f08000a
int id editTx_send 0x7f080008
int id gridview_list 0x7f08000f
int id item_image 0x7f080010
int id item_text 0x7f080011
int id item_text_info 0x7f080012
int id layer1_linear0 0x7f080001
int id layer1_linear2 0x7f080004
int id layer1_linear3 0x7f080007
int id layout_setting 0x7f080013
int id mainlayout 0x7f080000
int id settingImage 0x7f080014
int id spinner_baudrate 0x7f080019
int id spinner_data 0x7f08001a
int id spinner_flowcontrol 0x7f08001d
int id spinner_parity 0x7f08001b
int id spinner_stopbit 0x7f08001c
int id text_test 0x7f08000b
int id unGroupImage 0x7f080015
int id unGrouptBtn 0x7f080016
int layout activity_chat 0x7f030000
int layout activity_main 0x7f030001
int layout layout_item 0x7f030002
int layout layout_item_setting 0x7f030003
int layout layout_popmenu 0x7f030004
int layout setting_group 0x7f030005
int layout setting_serialport 0x7f030006
int menu chat 0x7f070000
int menu main 0x7f070001
int string action_settings 0x7f060000
int string app_name 0x7f060001
int string hello_world 0x7f060002
int string title_activity_chat 0x7f060003
int style AppBaseTheme 0x7f040000
int style AppTheme 0x7f040001

View file

@ -0,0 +1,99 @@
-- Merging decision tree log ---
manifest
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:2:1-54:12
xmlns:tools
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:3:5-51
xmlns:android
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:2:11-69
package
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:4:5-38
INJECTED from E:\UART_Adapter\app\src\main\AndroidManifest.xml
INJECTED from E:\UART_Adapter\app\src\main\AndroidManifest.xml
android:versionName
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:6:5-43
INJECTED from E:\UART_Adapter\app\src\main\AndroidManifest.xml
INJECTED from E:\UART_Adapter\app\src\main\AndroidManifest.xml
android:versionCode
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:5:5-28
INJECTED from E:\UART_Adapter\app\src\main\AndroidManifest.xml
INJECTED from E:\UART_Adapter\app\src\main\AndroidManifest.xml
uses-sdk
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:8:5-10:41
MERGED from [com.android.support:support-v4:20.0.0] E:\UART_Adapter\app\build\intermediates\exploded-aar\com.android.support\support-v4\20.0.0\AndroidManifest.xml:16:5-42
android:targetSdkVersion
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:10:9-38
INJECTED from E:\UART_Adapter\app\src\main\AndroidManifest.xml
INJECTED from E:\UART_Adapter\app\src\main\AndroidManifest.xml
android:minSdkVersion
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:9:9-35
INJECTED from E:\UART_Adapter\app\src\main\AndroidManifest.xml
INJECTED from E:\UART_Adapter\app\src\main\AndroidManifest.xml
uses-permission#android.permission.ACCESS_WIFI_STATE
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:12:5-14:35
android:required
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:14:9-32
android:name
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:13:9-60
uses-permission#android.permission.CHANGE_WIFI_STATE
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:15:5-17:35
android:required
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:17:9-32
android:name
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:16:9-60
uses-permission#android.permission.ACCESS_NETWORK_STATE
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:18:5-20:65
android:required
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:19:9-32
android:name
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:20:9-63
uses-permission#android.permission.INTERNET
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:21:5-23:35
android:required
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:23:9-32
android:name
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:22:9-51
uses-permission#android.permission.CHANGE_WIFI_MULTICAST_STATE
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:24:5-26:72
android:required
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:25:9-32
android:name
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:26:9-70
uses-permission#android.permission.CHANGE_NETWORK_STATE
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:27:5-29:65
android:required
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:28:9-32
android:name
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:29:9-63
application
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:32:5-52:19
MERGED from [com.android.support:support-v4:20.0.0] E:\UART_Adapter\app\build\intermediates\exploded-aar\com.android.support\support-v4\20.0.0\AndroidManifest.xml:17:5-19
android:label
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:35:9-41
android:allowBackup
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:33:9-35
android:icon
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:34:9-45
android:theme
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:36:9-40
activity#com.realtek.uartthrough.MainActivity
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:38:9-46:20
android:label
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:40:13-45
android:name
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:39:13-64
intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:41:13-45:29
action#android.intent.action.MAIN
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:42:17-69
android:name
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:42:25-66
category#android.intent.category.LAUNCHER
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:44:17-77
android:name
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:44:27-74
activity#com.realtek.uartthrough.ChatActivity
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:48:9-51:20
android:label
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:50:13-56
android:name
ADDED from E:\UART_Adapter\app\src\main\AndroidManifest.xml:49:13-64

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<lint>
</lint>

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.realtek.uartthrough"
android:versionCode="1"
android:versionName="1.0.3.20161221.a">
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="19" />
<uses-permission
android:name="android.permission.ACCESS_WIFI_STATE"
android:required="true" />
<uses-permission
android:name="android.permission.CHANGE_WIFI_STATE"
android:required="true" />
<uses-permission
android:required="true"
android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission
android:name="android.permission.INTERNET"
android:required="true" />
<uses-permission
android:required="true"
android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
<uses-permission
android:required="true"
android:name="android.permission.CHANGE_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.realtek.uartthrough.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.realtek.uartthrough.ChatActivity"
android:label="@string/title_activity_chat" >
</activity>
</application>
</manifest>

View file

@ -0,0 +1,198 @@
package com.realtek.uartthrough;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import android.content.Context;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.text.Html;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
public class ChatActivity extends Activity {
//UI layout
private ImageButton btn_back;
private EditText editTx_send;
private Button btn_send;
private TextView text_chatDisplay;
private boolean rxThreadExit = false;
//Thread
private Thread rxThread = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_chat);
initData();
initComponent();
initComponentAction();
}
@Override
protected void onStart()
{
super.onStart();
rxThread = new Thread(){
@Override
public void run() {
while(!rxThreadExit){
try {
Thread.sleep(50);
} catch (InterruptedException e) {
e.printStackTrace();
}
runOnUiThread(new Runnable() {
@Override
public void run() {
if(MainActivity.g_d.isReadable()) {
updateInfoDisplay(MainActivity.g_d.getInfo());
MainActivity.g_d.resetInfo();
MainActivity.g_d.setReadable(false);
}
}}
);
}
rxThreadExit = false;
}
};
rxThread.start();
}
@Override
protected void onStop() {
super.onStop();
if(rxThread != null){
//rxThread.interrupt();
rxThreadExit = true;
rxThread = null;
}
}
@Override
protected void onResume() {
super.onResume();
if(rxThread == null) {
rxThreadExit = false;
rxThread.start();
}
}
private void initData() {
// TODO Auto-generated method stub
}
private void initComponent() {
btn_back = (ImageButton) findViewById(R.id.btn_back);
editTx_send = (EditText) findViewById(R.id.editTx_send);
btn_send = (Button) findViewById(R.id.btn_send);
text_chatDisplay = (TextView) findViewById(R.id.chatDisplay);
SimpleDateFormat df = new SimpleDateFormat("yyyy.MM.dd");
String date = df.format(Calendar.getInstance().getTime());
text_chatDisplay.append("========== "+date+" ==========\n");
editTx_send.setText("");
}
private void initComponentAction() {
btn_back.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
MainActivity.g_d.setCmd("stop");
MainActivity.g_d.resetInfo();
MainActivity.g_d.opStates().setOpState(MainActivity.g_d.opStates().stateAppStart());
Intent intent_Navigation = new Intent();
intent_Navigation.setClass(ChatActivity.this, MainActivity.class);
startActivity(intent_Navigation);
finish();
}
});
btn_send.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if(editTx_send.getText().toString().length()>0){
String text = editTx_send.getText().toString();
MainActivity.g_d.setTx(text);
MainActivity.g_d.setCmd("send");
//text_chatDisplay.setTextColor(Color.parseColor("#e54545"));
text_chatDisplay.append( Html.fromHtml(getCurrentTimeforHTML()) );
text_chatDisplay.append( Html.fromHtml( "<font color=\"#47a842\">[Me]" + text + "</font>" ) );
text_chatDisplay.append("\n");
editTx_send.setText("");
}
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
}
});
}
private void updateInfoDisplay(String recvStr) {
if(recvStr.length()>0){
String lines[] = recvStr.split("\\r?\\n");
for (int i = 0; i < lines.length; i++) {
SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
//String date = df.format(Calendar.getInstance().getTime());
//text_chatDisplay.setTextColor(Color.parseColor("#8ebbeb"));
text_chatDisplay.append(Html.fromHtml(getCurrentTimeforHTML()));
text_chatDisplay.append(Html.fromHtml("<font color=\"#8ebbeb\">[Ameba]" + lines[i] + "</font>"));
text_chatDisplay.append("\n");
}
}
}
private String getCurrentTimeforHTML() {
SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
String date = df.format(Calendar.getInstance().getTime());
String result = "<i><small><font color=\"#c5c5c5\">"+ date + "</font></small></i>";
return result;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.chat, menu);
return true;
}
}

View file

@ -0,0 +1,96 @@
package com.realtek.uartthrough;
//import java.io.Serializable;
public class DeviceManager {
public static enum CmdType {
/*SETUP,
CH_POS,
REMOVE,
TIP_G,
TIP,
RENAME,
TODO_FINISH,*/
DEFAULT
};
public static class DeviceInfo //implements Serializable
{
//private static final long serialVersionUID = 1L;
private int aliveFlag;
private String name;
private String nameGroup;
private String name_small;
private String IP;
private int port;
private String macAdrress;
private int img;
public int getaliveFlag()
{
return this.aliveFlag;
}
public void setaliveFlag(int aliveFlag)
{
this.aliveFlag = aliveFlag;
}
public String getNameGroup()
{
return this.nameGroup;
}
public void setNameGroup(String name)
{
this.nameGroup= name;
}
public String getName()
{
return this.name;
}
public void setName(String name)
{
this.name= name;
}
public String getName_small()
{
return this.name_small;
}
public void setName_small(String name)
{
this.name_small= name;
}
public String getIP()
{
return this.IP;
}
public void setIP(String IP)
{
this.IP= IP;
}
public int getPort()
{
return this.port;
}
public void setPort(int port)
{
this.port= port;
}
public String getmacAdrress()
{
return this.macAdrress;
}
public void setmacAdrress(String macAdrress)
{
this.macAdrress= macAdrress;
}
public int getimg()
{
return this.img;
}
public void setimg(int img)
{
this.img= img;
}
}
}

View file

@ -0,0 +1,314 @@
package com.realtek.uartthrough;
import android.util.Log;
import java.net.InetAddress;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Vector;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import javax.jmdns.ServiceInfo;
public class Globals_ctrl {
private static Globals_ctrl thisGlobal;
private static String infoDisplay = "";
private static final String mServiceName = "AMEBA";
private static final String TAG = "Globals_ctrl";
private static final String mServiceType = "_uart_control._tcp.local.";
private static boolean isResolveDone = false;
private static String successRec = "";
private static String sensorReadings = "";
private static Vector<ServiceInfo> deviceList = new Vector<ServiceInfo>();
private static InetAddress connIP = null;
private static int connPort=0;
private static String cmd="continue";
private static ByteBuffer tx = ByteBuffer.allocate(128);
private static byte[] recvBuffer = new byte[64];
private final Lock _mutex_recvBuf = new ReentrantLock(true);
private static OpStates os = OpStates.getInstance();
public Globals_ctrl(){}
public boolean isResolveFinish(){
return isResolveDone;
}
public void setResolveFinish(){
isResolveDone = true;
}
public void ResolveStatusReset(){
isResolveDone = false;
}
public void resetRecvBuffer(){
Arrays.fill( recvBuffer, (byte) 0 );
}
public boolean checkRecvBufUpdate(){
if(recvBuffer.length>0)
return true;
else
return false;
}
public void commitRecvBuffer(byte[] info, int len){
_mutex_recvBuf.lock();
resetRecvBuffer();
System.arraycopy(info, 0, recvBuffer, 0, len);
_mutex_recvBuf.unlock();
}
public String pullRecvBuffer(){
if(recvBuffer[0]<=0){
return "";
}else{
_mutex_recvBuf.lock();
byte [] res = new byte[recvBuffer.length];
System.arraycopy(recvBuffer, 0, res, 0, recvBuffer.length);
_mutex_recvBuf.unlock();
String controlInfo = parseRecvBuf(res);
return controlInfo;
}
}
private String parseRecvBuf(byte[] res) {
String result = "";
//check prefix
if(checkPrefix(res)){
int readbit = 10;
//-------- response for setting --------
if( convertirOctetEnEntier(res[readbit])==1 ){
result = "ok!!";
//-------- response for getting --------
}else if( convertirOctetEnEntier(res[readbit])==3 ){
readbit = readbit + 2;
int type = -1;
String str_len = "";
String str_HexValue = "";
do{
type = convertirOctetEnEntier(res[readbit]);
str_HexValue = Integer.toHexString(type);
if( type==1 ){//baudrate
result += "baudrate,";readbit++;
str_len = Integer.toHexString(convertirOctetEnEntier(res[readbit]));
int len = Integer.valueOf(str_len).intValue();
readbit++;
int bit = 0;
int v_rate = 0;
int tmp = 0;
for(int b=readbit;b<readbit+len;b++){
tmp = (res[b] & 0xFF) << (8*bit);
v_rate = v_rate + tmp ;
bit++;
}
result = result + String.valueOf(v_rate) + ";";readbit+=(len+1);
}else if( type==2 ){//data
result += "data,";readbit++;
str_len = Integer.toHexString(convertirOctetEnEntier(res[readbit])) + ",";
readbit++;
result = result + Integer.toHexString(convertirOctetEnEntier(res[readbit])) + ";";readbit+=2;
}else if( type==4 ){//parity
result += "parity,";readbit++;
str_len = Integer.toHexString(convertirOctetEnEntier(res[readbit])) + ",";
readbit++;
result = result + Integer.toHexString(convertirOctetEnEntier(res[readbit])) + ";";readbit+=2;
}else if( type==8 ){//stopbit
result += "stopbit,";readbit++;
str_len = Integer.toHexString(convertirOctetEnEntier(res[readbit])) + ",";
readbit++;
result = result + Integer.toHexString(convertirOctetEnEntier(res[readbit])) + ";";readbit+=2;
}/*else if( type==16 ){//flowcontrol
result += "flowcontrol,";readbit++;
str_len = Integer.toHexString(convertirOctetEnEntier(res[readbit])) + ",";
readbit++;
result = result + Integer.toHexString(convertirOctetEnEntier(res[readbit])) + ";";readbit++;
}*/else
readbit++;
}while(readbit<recvBuffer.length );
}
}else{
}
return result;
}
private boolean checkPrefix(byte[] recvBuf) {
if("41".equals(String.format("0x%20x", recvBuf[0])) )
return false;
if("4D".equals(String.format("0x%20x", recvBuf[1])) )
return false;
if("45".equals(String.format("0x%20x", recvBuf[2])))
return false;
if("42".equals(String.format("0x%20x", recvBuf[3])))
return false;
if("41".equals(String.format("0x%20x", recvBuf[4])))
return false;
if("5F".equals(String.format("0x%20x", recvBuf[5])))
return false;
if("55".equals(String.format("0x%20x", recvBuf[6])))
return false;
if("41".equals(String.format("0x%20x", recvBuf[7])))
return false;
if("52".equals(String.format("0x%20x", recvBuf[8])))
return false;
if("54".equals(String.format("0x%20x", recvBuf[9])))
return false;
return true;
}
public String byte2bits(byte b) {
int z = b; z |= 256;
String str = Integer.toBinaryString(z);
int len = str.length();
return str.substring(len-8, len);
}
public int convertirOctetEnEntier(byte b){
int MASK = 0xFF;
int result = 0;
result = b & MASK;
return result;
}
public int byteArrayToInt(byte[] bytes) {
int value= 0;
for (int i = 0; i < 4; i++) {
int shift= (4 - 1 - i) * 8;
value +=(bytes[i] & 0x000000FF) << shift;
}
return value;
}
public void addInfo(String str){
infoDisplay+=(str+"\n");
}
public String getInfo(){
return infoDisplay;
}
public void resetInfo(){
infoDisplay="";
}
public String getServiceName(){
return mServiceName;
}
public String getServiceType(){
return mServiceType;
}
public String getSuccessRec(){
return successRec;
}
public void setSuccessRec(String str){
successRec=str;
}
public void setConnIP(InetAddress address){
connIP = address;
}
public InetAddress getConnIP(){
return connIP;
}
public void setConnPort(int p){
connPort=p;
}
public int getConnPort(){
return connPort;
}
public void setTx(byte bytes[]){
tx.put(bytes);
}
public byte[] getTx(){
return tx.array();
}
public void clearTx(){
tx.clear();
tx.put(new byte[128]);
tx.clear();
}
public void clearCmd(){
cmd="";
}
public void setCmd(String str){
cmd=str;
}
public String getCmd(){
return cmd;
}
public void clearDeviceList(){
deviceList.clear();
}
public Vector<ServiceInfo> getDeviceList(){
return deviceList;
}
public void addSensorReading(String reading){
sensorReadings = sensorReadings + reading;
}
public OpStates opStates(){
return os;
}
public static synchronized Globals_ctrl getInstance(){
if(thisGlobal==null){
thisGlobal = new Globals_ctrl();
}
return thisGlobal;
}
}

View file

@ -0,0 +1,152 @@
package com.realtek.uartthrough;
import java.net.InetAddress;
import java.util.Vector;
import javax.jmdns.ServiceInfo;
public class Globals_d {
private static Globals_d thisGlobal;
private static String infoDisplay_d = "";
private static boolean readable = false;
private static final String mServiceName = "AMEBA";
private static final String mServiceType = "_uart_data._tcp.local.";
private static boolean isResolveDone = false;
private static String successRec = "";
private static String sensorReadings = "";
private static Vector<ServiceInfo> deviceList = new Vector<ServiceInfo>();
private static InetAddress connIP = null;
private static int connPort=0;
private static String cmd="continue";
private static String tx="";
private static OpStates os = OpStates.getInstance();
public Globals_d(){}
public boolean isResolveFinish(){
return isResolveDone;
}
public void setResolveFinish(){
isResolveDone = true;
}
public void ResolveStatusReset(){
isResolveDone = false;
}
public boolean isReadable(){
return readable;
}
public void setReadable(boolean val){
readable = val;
}
public void addInfo(String str){
infoDisplay_d+=(str);
}
public String getInfo(){
return infoDisplay_d;
}
public void resetInfo(){
infoDisplay_d="";
}
public String getServiceName(){
return mServiceName;
}
public String getServiceType(){
return mServiceType;
}
public String getSuccessRec(){
return successRec;
}
public void setSuccessRec(String str){
successRec=str;
}
public void setConnIP(InetAddress address){
connIP = address;
}
public InetAddress getConnIP(){
return connIP;
}
public void setConnPort(int p){
connPort=p;
}
public int getConnPort(){
return connPort;
}
public void setTx(String str){
tx=str;
}
public String getTx(){
return tx;
}
public void clearTx(){
tx="";
}
public void clearCmd(){
cmd="";
}
public void setCmd(String str){
cmd=str;
}
public String getCmd(){
return cmd;
}
public void clearDeviceList(){
deviceList.clear();
}
public Vector<ServiceInfo> getDeviceList(){
return deviceList;
}
public void addSensorReading(String reading){
sensorReadings = sensorReadings + reading;
}
public OpStates opStates(){
return os;
}
public static synchronized Globals_d getInstance(){
if(thisGlobal==null){
thisGlobal = new Globals_d();
}
return thisGlobal;
}
}

Some files were not shown because too many files have changed in this diff Show more