iii
This commit is contained in:
parent
2da8828ef1
commit
b1c1a0cb1f
BIN
.idea/caches/build_file_checksums.ser
Normal file
BIN
.idea/caches/build_file_checksums.ser
Normal file
Binary file not shown.
BIN
.idea/caches/gradle_models.ser
Normal file
BIN
.idea/caches/gradle_models.ser
Normal file
Binary file not shown.
116
.idea/codeStyles/Project.xml
Normal file
116
.idea/codeStyles/Project.xml
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<codeStyleSettings language="XML">
|
||||||
|
<indentOptions>
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||||
|
</indentOptions>
|
||||||
|
<arrangement>
|
||||||
|
<rules>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>xmlns:android</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>xmlns:.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*:id</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*:name</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>style</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
</rules>
|
||||||
|
</arrangement>
|
||||||
|
</codeStyleSettings>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<resourceExtensions />
|
|
||||||
<wildcardResourcePatterns>
|
<wildcardResourcePatterns>
|
||||||
<entry name="!?*.java" />
|
<entry name="!?*.java" />
|
||||||
<entry name="!?*.form" />
|
<entry name="!?*.form" />
|
||||||
|
@ -12,11 +11,6 @@
|
||||||
<entry name="!?*.kt" />
|
<entry name="!?*.kt" />
|
||||||
<entry name="!?*.clj" />
|
<entry name="!?*.clj" />
|
||||||
</wildcardResourcePatterns>
|
</wildcardResourcePatterns>
|
||||||
<annotationProcessing>
|
<bytecodeTargetLevel target="1.8" />
|
||||||
<profile default="true" name="Default" enabled="false">
|
|
||||||
<processorPath useClasspath="true" />
|
|
||||||
</profile>
|
|
||||||
</annotationProcessing>
|
|
||||||
<bytecodeTargetLevel target="1.7" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -1,8 +1,11 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
|
<option name="delegatedBuild" value="true" />
|
||||||
|
<option name="testRunner" value="PLATFORM" />
|
||||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
|
@ -13,6 +16,7 @@
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveModulePerSourceSet" value="false" />
|
<option name="resolveModulePerSourceSet" value="false" />
|
||||||
|
<option name="useQualifiedModuleNames" value="true" />
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|
30
.idea/jarRepositories.xml
Normal file
30
.idea/jarRepositories.xml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="BintrayJCenter" />
|
||||||
|
<option name="name" value="BintrayJCenter" />
|
||||||
|
<option name="url" value="https://jcenter.bintray.com/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Google" />
|
||||||
|
<option name="name" value="Google" />
|
||||||
|
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Google2" />
|
||||||
|
<option name="name" value="Google2" />
|
||||||
|
<option name="url" value="https://maven.google.com/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -5,26 +5,47 @@
|
||||||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||||
<option name="myNullables">
|
<option name="myNullables">
|
||||||
<value>
|
<value>
|
||||||
<list size="4">
|
<list size="15">
|
||||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
|
<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="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="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
|
||||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
||||||
|
<item index="4" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
|
||||||
|
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
|
||||||
|
<item index="6" class="java.lang.String" itemvalue="android.annotation.Nullable" />
|
||||||
|
<item index="7" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
|
||||||
|
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
|
||||||
|
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
|
||||||
|
<item index="10" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
|
||||||
|
<item index="11" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
|
||||||
|
<item index="12" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.Nullable" />
|
||||||
|
<item index="13" class="java.lang.String" itemvalue="io.reactivex.annotations.Nullable" />
|
||||||
|
<item index="14" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.Nullable" />
|
||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
<option name="myNotNulls">
|
<option name="myNotNulls">
|
||||||
<value>
|
<value>
|
||||||
<list size="4">
|
<list size="14">
|
||||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
|
<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="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="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
|
||||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
||||||
|
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
|
||||||
|
<item index="5" class="java.lang.String" itemvalue="android.annotation.NonNull" />
|
||||||
|
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
|
||||||
|
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
|
||||||
|
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
|
||||||
|
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
|
||||||
|
<item index="10" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
|
||||||
|
<item index="11" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
|
||||||
|
<item index="12" class="java.lang.String" itemvalue="io.reactivex.annotations.NonNull" />
|
||||||
|
<item index="13" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.NonNull" />
|
||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/Application/Application.iml" filepath="$PROJECT_DIR$/Application/Application.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/android_antlib_4-14/android_antlib_4-14.iml" filepath="$PROJECT_DIR$/android_antlib_4-14/android_antlib_4-14.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/iconsole-android.iml" filepath="$PROJECT_DIR$/iconsole-android.iml" />
|
<module fileurl="file://$PROJECT_DIR$/iconsole-android.iml" filepath="$PROJECT_DIR$/iconsole-android.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/Application/iconsole-android.Application.iml" filepath="$PROJECT_DIR$/.idea/modules/Application/iconsole-android.Application.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/android_antlib_4-14/iconsole-android.android_antlib_4-14.iml" filepath="$PROJECT_DIR$/.idea/modules/android_antlib_4-14/iconsole-android.android_antlib_4-14.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
83
.idea/modules/Application/iconsole-android.Application.iml
Normal file
83
.idea/modules/Application/iconsole-android.Application.iml
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module external.linked.project.id=":Application" external.linked.project.path="$MODULE_DIR$/../../../Application" external.root.project.path="$MODULE_DIR$/../../.." external.system.id="GRADLE" external.system.module.group="iconsole-android" 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=":Application" />
|
||||||
|
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="4.1.3" />
|
||||||
|
<option name="LAST_KNOWN_AGP_VERSION" value="4.1.3" />
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
<facet type="android" name="Android">
|
||||||
|
<configuration>
|
||||||
|
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
||||||
|
<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$/../../../Application/src/main/res;file://$MODULE_DIR$/../../../Application/src/common/res;file://$MODULE_DIR$/../../../Application/src/template/res;file://$MODULE_DIR$/../../../Application/src/debug/res;file://$MODULE_DIR$/../../../Application/build/generated/res/rs/debug;file://$MODULE_DIR$/../../../Application/build/generated/res/resValues/debug" />
|
||||||
|
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/../../../Application/tests/res;file://$MODULE_DIR$/../../../Application/src/androidTestDebug/res;file://$MODULE_DIR$/../../../Application/build/generated/res/rs/androidTest/debug;file://$MODULE_DIR$/../../../Application/build/generated/res/resValues/androidTest/debug" />
|
||||||
|
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
|
||||||
|
<output url="file://$MODULE_DIR$/../../../Application/build/intermediates/javac/debug/classes" />
|
||||||
|
<output-test url="file://$MODULE_DIR$/../../../Application/build/intermediates/javac/debugUnitTest/classes" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$/../../../Application">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/../../../Application/src/main/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/../../../Application/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/../../../Application/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/../../../Application/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/../../../Application/src/main/res" type="java-resource" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/../../../Application/build/generated/res/resValues/debug" type="java-resource" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/../../../Application/.gradle" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/../../../Application/build" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:collections:28.0.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: android.arch.core:common:1.1.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:28.0.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support.constraint:constraint-layout-solver:1.1.3" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:gridlayout-v7:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:support-v13:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:support-v4:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:support-fragment:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:support-core-utils:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:viewpager:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:coordinatorlayout:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:drawerlayout:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:slidingpanelayout:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:customview:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:swiperefreshlayout:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:asynclayoutinflater:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:loader:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:support-media-compat:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:support-compat:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:cardview-v7:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:versionedparcelable:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:cursoradapter:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime:1.1.1@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:interpolator:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:documentfile:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:localbroadcastmanager:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support:print:28.0.0@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: android.arch.lifecycle:viewmodel:1.1.1@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata:1.1.1@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core:1.1.1@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: android.arch.core:runtime:1.1.1@aar" level="project" />
|
||||||
|
<orderEntry type="library" name="Gradle: com.android.support.constraint:constraint-layout:1.1.3@aar" level="project" />
|
||||||
|
<orderEntry type="module" module-name="iconsole-android.android_antlib_4-14" />
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module external.linked.project.id=":android_antlib_4-14" external.linked.project.path="$MODULE_DIR$/../../../android_antlib_4-14" external.root.project.path="$MODULE_DIR$/../../.." external.system.id="GRADLE" external.system.module.group="iconsole-android" 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=":android_antlib_4-14" />
|
||||||
|
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" />
|
||||||
|
<option name="LAST_KNOWN_AGP_VERSION" />
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
<facet type="java-gradle" name="Java-Gradle">
|
||||||
|
<configuration>
|
||||||
|
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/../../../android_antlib_4-14/build" />
|
||||||
|
<option name="BUILDABLE" value="false" />
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$/../../../android_antlib_4-14">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/../../../android_antlib_4-14/.gradle" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/../../../android_antlib_4-14/build" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" exported="" name="Gradle: iconsole-android.android_antlib_4-14.android_antlib_4-14-0" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -1,145 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module external.linked.project.id=":Application" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
|
||||||
<component name="FacetManager">
|
|
||||||
<facet type="android-gradle" name="Android-Gradle">
|
|
||||||
<configuration>
|
|
||||||
<option name="GRADLE_PROJECT_PATH" value=":Application" />
|
|
||||||
</configuration>
|
|
||||||
</facet>
|
|
||||||
<facet type="android" name="Android">
|
|
||||||
<configuration>
|
|
||||||
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
|
||||||
<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_7">
|
|
||||||
<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/apt/debug" isTestSource="false" generated="true" />
|
|
||||||
<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/apt/androidTest/debug" isTestSource="true" generated="true" />
|
|
||||||
<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$/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />
|
|
||||||
<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/rs" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" 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/rs" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/common/res" type="java-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/template/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/common/java" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/template/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$/tests/res" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/tests/resources" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/tests/assets" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/tests/aidl" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/tests/src" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/tests/rs" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/tests/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/intermediates/assets" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/build-info" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
|
||||||
<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-verifier" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-apk" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-main-apk-res" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaPrecompile" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifest-checker" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" />
|
|
||||||
<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/splits-support" />
|
|
||||||
<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 28 Platform" jdkType="Android SDK" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-v4-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.0@jar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-fragment-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:27.1.1@jar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:cardview-v7-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: android.arch.core:runtime-1.1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-compat-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: android.arch.lifecycle:viewmodel-1.1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support.constraint:constraint-layout-solver:1.1.2@jar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core-1.1.0" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-media-compat-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support.constraint:constraint-layout-1.1.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: android.arch.core:common:1.1.0@jar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-core-utils-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:gridlayout-v7-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-v13-27.1.1" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime-1.1.0" level="project" />
|
|
||||||
<orderEntry type="module" module-name="android_antlib_4-14" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
|
@ -10,7 +10,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.4.0'
|
classpath 'com.android.tools.build:gradle:4.1.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,14 +34,16 @@
|
||||||
>
|
>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name="org.surfsite.iconsole.MainActivity"
|
||||||
android:configChanges="orientation|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden"
|
||||||
android:label="@string/app_name" android:launchMode="singleTop">
|
android:label="@string/app_name" android:launchMode="singleTop">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
<service android:name=".ChannelService"></service>
|
<service android:name=".ChannelService"></service>
|
||||||
|
|
||||||
|
|
|
@ -44,10 +44,104 @@ import android.widget.NumberPicker;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import java.lang.ref.WeakReference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This fragment controls Bluetooth to communicate with other devices.
|
* This fragment controls Bluetooth to communicate with other devices.
|
||||||
*/
|
*/
|
||||||
public class BluetoothChatFragment extends Fragment {
|
public class BluetoothChatFragment extends Fragment {
|
||||||
|
static class MyInnerHandler extends Handler{
|
||||||
|
WeakReference<BluetoothChatFragment> mFrag;
|
||||||
|
|
||||||
|
MyInnerHandler(BluetoothChatFragment aFragment) {
|
||||||
|
mFrag = new WeakReference<BluetoothChatFragment>(aFragment);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleMessage(Message msg) {
|
||||||
|
BluetoothChatFragment theFrag = mFrag.get();
|
||||||
|
if (theFrag == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
FragmentActivity activity = theFrag.getActivity();
|
||||||
|
|
||||||
|
switch (msg.what) {
|
||||||
|
case Constants.MESSAGE_STATE_CHANGE:
|
||||||
|
switch (msg.arg1) {
|
||||||
|
case BluetoothChatService.STATE_CONNECTED:
|
||||||
|
theFrag.setStatus(theFrag.getString(R.string.title_connected_to, theFrag.mConnectedDeviceName));
|
||||||
|
//mConversationArrayAdapter.clear();
|
||||||
|
theFrag.mStartButton.setEnabled(true);
|
||||||
|
theFrag.mStopButton.setEnabled(true);
|
||||||
|
theFrag.mDisconnectButton.setEnabled(true);
|
||||||
|
theFrag.mLevel.setEnabled(true);
|
||||||
|
theFrag.mLevel.setValue(1);
|
||||||
|
break;
|
||||||
|
case BluetoothChatService.STATE_CONNECTING:
|
||||||
|
theFrag.setStatus(R.string.title_connecting);
|
||||||
|
theFrag.mStartButton.setEnabled(false);
|
||||||
|
theFrag.mStopButton.setEnabled(false);
|
||||||
|
theFrag.mDisconnectButton.setEnabled(false);
|
||||||
|
theFrag.mLevel.setEnabled(false);
|
||||||
|
break;
|
||||||
|
case BluetoothChatService.STATE_LISTEN:
|
||||||
|
case BluetoothChatService.STATE_NONE:
|
||||||
|
theFrag.setStatus(R.string.title_not_connected);
|
||||||
|
theFrag.mStartButton.setEnabled(false);
|
||||||
|
theFrag.mStopButton.setEnabled(false);
|
||||||
|
theFrag.mDisconnectButton.setEnabled(false);
|
||||||
|
theFrag.mLevel.setEnabled(false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Constants.MESSAGE_DATA:
|
||||||
|
if (!(msg.obj instanceof IConsole.Data))
|
||||||
|
return;
|
||||||
|
IConsole.Data data = (IConsole.Data) msg.obj;
|
||||||
|
theFrag.mChannelService.setSpeed(data.mSpeed10 / 10.0);
|
||||||
|
theFrag.mChannelService.setPower(data.mPower10 * 9 / 100);
|
||||||
|
theFrag.mChannelService.setCadence(data.mRPM);
|
||||||
|
|
||||||
|
theFrag.mSpeedText.setText(String.format("% 3.1f", data.mSpeed10 / 10.0));
|
||||||
|
theFrag.mPowerText.setText(String.format("% 3.1f", data.mPower10 / 10.0));
|
||||||
|
theFrag.mRPMText.setText(String.format("%d", data.mRPM));
|
||||||
|
theFrag.mDistanceText.setText(String.format("% 3.1f", data.mDistance10 / 10.0));
|
||||||
|
theFrag.mCaloriesText.setText(String.format("% 3d", data.mCalories));
|
||||||
|
theFrag.mHFText.setText(String.format("%d", data.mHF));
|
||||||
|
theFrag.mTimeText.setText(String.format("%s", data.getTimeStr()));
|
||||||
|
//mLevel.setValue(data.mLevel);
|
||||||
|
break;
|
||||||
|
case Constants.MESSAGE_WRITE:
|
||||||
|
//byte[] writeBuf = (byte[]) msg.obj;
|
||||||
|
// construct a string from the buffer
|
||||||
|
//String writeMessage = new String(writeBuf);
|
||||||
|
//mConversationArrayAdapter.add("Me: " + writeMessage);
|
||||||
|
break;
|
||||||
|
case Constants.MESSAGE_READ:
|
||||||
|
//byte[] readBuf = (byte[]) msg.obj;
|
||||||
|
// construct a string from the valid bytes in the buffer
|
||||||
|
//String readMessage = new String(readBuf, 0, msg.arg1);
|
||||||
|
//mConversationArrayAdapter.add(mConnectedDeviceName + ": " + readMessage);
|
||||||
|
break;
|
||||||
|
case Constants.MESSAGE_DEVICE_NAME:
|
||||||
|
// save the connected device's name
|
||||||
|
theFrag.mConnectedDeviceName = msg.getData().getString(Constants.DEVICE_NAME);
|
||||||
|
if (null != activity) {
|
||||||
|
Toast.makeText(activity, "Connected to "
|
||||||
|
+ theFrag.mConnectedDeviceName, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Constants.MESSAGE_TOAST:
|
||||||
|
if (null != activity) {
|
||||||
|
Toast.makeText(activity, msg.getData().getString(Constants.TOAST),
|
||||||
|
Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private final Handler mHandler = new MyInnerHandler(this);
|
||||||
|
|
||||||
private static final String TAG = "BluetoothChatFragment";
|
private static final String TAG = "BluetoothChatFragment";
|
||||||
|
|
||||||
|
@ -92,86 +186,6 @@ public class BluetoothChatFragment extends Fragment {
|
||||||
/**
|
/**
|
||||||
* The Handler that gets information back from the BluetoothChatService
|
* The Handler that gets information back from the BluetoothChatService
|
||||||
*/
|
*/
|
||||||
private final Handler mHandler = new Handler() {
|
|
||||||
@SuppressLint("DefaultLocale")
|
|
||||||
@Override
|
|
||||||
public void handleMessage(Message msg) {
|
|
||||||
FragmentActivity activity = getActivity();
|
|
||||||
switch (msg.what) {
|
|
||||||
case Constants.MESSAGE_STATE_CHANGE:
|
|
||||||
switch (msg.arg1) {
|
|
||||||
case BluetoothChatService.STATE_CONNECTED:
|
|
||||||
setStatus(getString(R.string.title_connected_to, mConnectedDeviceName));
|
|
||||||
//mConversationArrayAdapter.clear();
|
|
||||||
mStartButton.setEnabled(true);
|
|
||||||
mStopButton.setEnabled(true);
|
|
||||||
mDisconnectButton.setEnabled(true);
|
|
||||||
mLevel.setEnabled(true);
|
|
||||||
mLevel.setValue(1);
|
|
||||||
break;
|
|
||||||
case BluetoothChatService.STATE_CONNECTING:
|
|
||||||
setStatus(R.string.title_connecting);
|
|
||||||
mStartButton.setEnabled(false);
|
|
||||||
mStopButton.setEnabled(false);
|
|
||||||
mDisconnectButton.setEnabled(false);
|
|
||||||
mLevel.setEnabled(false);
|
|
||||||
break;
|
|
||||||
case BluetoothChatService.STATE_LISTEN:
|
|
||||||
case BluetoothChatService.STATE_NONE:
|
|
||||||
setStatus(R.string.title_not_connected);
|
|
||||||
mStartButton.setEnabled(false);
|
|
||||||
mStopButton.setEnabled(false);
|
|
||||||
mDisconnectButton.setEnabled(false);
|
|
||||||
mLevel.setEnabled(false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case Constants.MESSAGE_DATA:
|
|
||||||
if (!(msg.obj instanceof IConsole.Data))
|
|
||||||
return;
|
|
||||||
IConsole.Data data = (IConsole.Data) msg.obj;
|
|
||||||
mChannelService.setSpeed(data.mSpeed10 / 10.0);
|
|
||||||
mChannelService.setPower(data.mPower10 / 10);
|
|
||||||
mChannelService.setCadence(data.mRPM);
|
|
||||||
|
|
||||||
mSpeedText.setText(String.format("% 3.1f", data.mSpeed10 / 10.0));
|
|
||||||
mPowerText.setText(String.format("% 3.1f", data.mPower10 / 10.0));
|
|
||||||
mRPMText.setText(String.format("%d", data.mRPM));
|
|
||||||
mDistanceText.setText(String.format("% 3.1f", data.mDistance10 / 10.0));
|
|
||||||
mCaloriesText.setText(String.format("% 3d", data.mCalories));
|
|
||||||
mHFText.setText(String.format("%d", data.mHF));
|
|
||||||
mTimeText.setText(String.format("%s", data.getTimeStr()));
|
|
||||||
//mLevel.setValue(data.mLevel);
|
|
||||||
break;
|
|
||||||
case Constants.MESSAGE_WRITE:
|
|
||||||
//byte[] writeBuf = (byte[]) msg.obj;
|
|
||||||
// construct a string from the buffer
|
|
||||||
//String writeMessage = new String(writeBuf);
|
|
||||||
//mConversationArrayAdapter.add("Me: " + writeMessage);
|
|
||||||
break;
|
|
||||||
case Constants.MESSAGE_READ:
|
|
||||||
//byte[] readBuf = (byte[]) msg.obj;
|
|
||||||
// construct a string from the valid bytes in the buffer
|
|
||||||
//String readMessage = new String(readBuf, 0, msg.arg1);
|
|
||||||
//mConversationArrayAdapter.add(mConnectedDeviceName + ": " + readMessage);
|
|
||||||
break;
|
|
||||||
case Constants.MESSAGE_DEVICE_NAME:
|
|
||||||
// save the connected device's name
|
|
||||||
mConnectedDeviceName = msg.getData().getString(Constants.DEVICE_NAME);
|
|
||||||
if (null != activity) {
|
|
||||||
Toast.makeText(activity, "Connected to "
|
|
||||||
+ mConnectedDeviceName, Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case Constants.MESSAGE_TOAST:
|
|
||||||
if (null != activity) {
|
|
||||||
Toast.makeText(activity, msg.getData().getString(Constants.TOAST),
|
|
||||||
Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
private boolean mChannelServiceBound = false;
|
private boolean mChannelServiceBound = false;
|
||||||
private ServiceConnection mConnection = new ServiceConnection() {
|
private ServiceConnection mConnection = new ServiceConnection() {
|
||||||
public void onServiceConnected(ComponentName className, IBinder service) {
|
public void onServiceConnected(ComponentName className, IBinder service) {
|
||||||
|
|
|
@ -141,6 +141,7 @@ public class BluetoothChatService extends Service {
|
||||||
mNewState = mState;
|
mNewState = mState;
|
||||||
|
|
||||||
// Give the new state to the Handler so the UI Activity can update
|
// Give the new state to the Handler so the UI Activity can update
|
||||||
|
if (mHandler != null)
|
||||||
mHandler.obtainMessage(Constants.MESSAGE_STATE_CHANGE, mNewState, -1).sendToTarget();
|
mHandler.obtainMessage(Constants.MESSAGE_STATE_CHANGE, mNewState, -1).sendToTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,9 @@ public class ChannelService extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void closeAllChannels() {
|
private void closeAllChannels() {
|
||||||
|
if (powerChannelController != null)
|
||||||
powerChannelController.close();
|
powerChannelController.close();
|
||||||
|
if (speedChannelController != null)
|
||||||
speedChannelController.close();
|
speedChannelController.close();
|
||||||
powerChannelController = null;
|
powerChannelController = null;
|
||||||
speedChannelController = null;
|
speedChannelController = null;
|
||||||
|
|
|
@ -0,0 +1,316 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2012 Dynastream Innovations Inc.
|
||||||
|
*
|
||||||
|
* 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 org.surfsite.iconsole;
|
||||||
|
|
||||||
|
import android.os.RemoteException;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.dsi.ant.channel.AntChannel;
|
||||||
|
import com.dsi.ant.channel.AntCommandFailedException;
|
||||||
|
import com.dsi.ant.channel.Capabilities;
|
||||||
|
import com.dsi.ant.channel.IAntChannelEventHandler;
|
||||||
|
import com.dsi.ant.message.ChannelId;
|
||||||
|
import com.dsi.ant.message.ChannelType;
|
||||||
|
import com.dsi.ant.message.EventCode;
|
||||||
|
import com.dsi.ant.message.fromant.AcknowledgedDataMessage;
|
||||||
|
import com.dsi.ant.message.fromant.ChannelEventMessage;
|
||||||
|
import com.dsi.ant.message.fromant.MessageFromAntType;
|
||||||
|
import com.dsi.ant.message.ipc.AntMessageParcel;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class FEChannelController {
|
||||||
|
public static final int FE_SENSOR_ID = 0x9e3d4b67;
|
||||||
|
// The device type and transmission type to be part of the channel ID message
|
||||||
|
private static final int CHANNEL_FE_DEVICE_TYPE = 0x11;
|
||||||
|
private static final int CHANNEL_FE_TRANSMISSION_TYPE = 5;
|
||||||
|
// The period and frequency values the channel will be configured to
|
||||||
|
private static final int CHANNEL_POWER_PERIOD = 8182; // 1 Hz
|
||||||
|
private static final int CHANNEL_POWER_FREQUENCY = 57;
|
||||||
|
private static final String TAG = FEChannelController.class.getSimpleName();
|
||||||
|
private static Random randGen = new Random();
|
||||||
|
int power = 0;
|
||||||
|
int cadence = 0;
|
||||||
|
private AntChannel mAntChannel;
|
||||||
|
private ChannelEventCallback mChannelEventCallback = new ChannelEventCallback();
|
||||||
|
private boolean mIsOpen;
|
||||||
|
|
||||||
|
public FEChannelController(AntChannel antChannel) {
|
||||||
|
mAntChannel = antChannel;
|
||||||
|
openChannel();
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean openChannel() {
|
||||||
|
if (null != mAntChannel) {
|
||||||
|
if (mIsOpen) {
|
||||||
|
Log.w(TAG, "Channel was already open");
|
||||||
|
} else {
|
||||||
|
// Channel ID message contains device number, type and transmission type. In
|
||||||
|
// order for master (TX) channels and slave (RX) channels to connect, they
|
||||||
|
// must have the same channel ID, or wildcard (0) is used.
|
||||||
|
ChannelId channelId = new ChannelId(FE_SENSOR_ID & 0xFFFF,
|
||||||
|
CHANNEL_FE_DEVICE_TYPE, CHANNEL_FE_TRANSMISSION_TYPE);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Setting the channel event handler so that we can receive messages from ANT
|
||||||
|
mAntChannel.setChannelEventHandler(mChannelEventCallback);
|
||||||
|
|
||||||
|
// Performs channel assignment by assigning the type to the channel. Additional
|
||||||
|
// features (such as, background scanning and frequency agility) can be enabled
|
||||||
|
// by passing an ExtendedAssignment object to assign(ChannelType, ExtendedAssignment).
|
||||||
|
mAntChannel.assign(ChannelType.BIDIRECTIONAL_MASTER);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Configures the channel ID, messaging period and rf frequency after assigning,
|
||||||
|
* then opening the channel.
|
||||||
|
*
|
||||||
|
* For any additional ANT features such as proximity search or background scanning, refer to
|
||||||
|
* the ANT Protocol Doc found at:
|
||||||
|
* http://www.thisisant.com/resources/ant-message-protocol-and-usage/
|
||||||
|
*/
|
||||||
|
mAntChannel.setChannelId(channelId);
|
||||||
|
mAntChannel.setPeriod(CHANNEL_POWER_PERIOD);
|
||||||
|
mAntChannel.setRfFrequency(CHANNEL_POWER_FREQUENCY);
|
||||||
|
mAntChannel.open();
|
||||||
|
mIsOpen = true;
|
||||||
|
|
||||||
|
Log.d(TAG, "Opened channel with device number: " + FE_SENSOR_ID);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
channelError(e);
|
||||||
|
} catch (AntCommandFailedException e) {
|
||||||
|
// This will release, and therefore unassign if required
|
||||||
|
channelError("Open failed", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.w(TAG, "No channel available");
|
||||||
|
}
|
||||||
|
|
||||||
|
return mIsOpen;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void channelError(RemoteException e) {
|
||||||
|
String logString = "Remote service communication failed.";
|
||||||
|
|
||||||
|
Log.e(TAG, logString);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void channelError(String error, AntCommandFailedException e) {
|
||||||
|
StringBuilder logString;
|
||||||
|
|
||||||
|
if (e.getResponseMessage() != null) {
|
||||||
|
String initiatingMessageId = "0x" + Integer.toHexString(
|
||||||
|
e.getResponseMessage().getInitiatingMessageId());
|
||||||
|
String rawResponseCode = "0x" + Integer.toHexString(
|
||||||
|
e.getResponseMessage().getRawResponseCode());
|
||||||
|
|
||||||
|
logString = new StringBuilder(error)
|
||||||
|
.append(". Command ")
|
||||||
|
.append(initiatingMessageId)
|
||||||
|
.append(" failed with code ")
|
||||||
|
.append(rawResponseCode);
|
||||||
|
} else {
|
||||||
|
String attemptedMessageId = "0x" + Integer.toHexString(
|
||||||
|
e.getAttemptedMessageType().getMessageId());
|
||||||
|
String failureReason = e.getFailureReason().toString();
|
||||||
|
|
||||||
|
logString = new StringBuilder(error)
|
||||||
|
.append(". Command ")
|
||||||
|
.append(attemptedMessageId)
|
||||||
|
.append(" failed with reason ")
|
||||||
|
.append(failureReason);
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.e(TAG, logString.toString());
|
||||||
|
|
||||||
|
mAntChannel.release();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close() {
|
||||||
|
// TODO kill all our resources
|
||||||
|
if (null != mAntChannel) {
|
||||||
|
mIsOpen = false;
|
||||||
|
|
||||||
|
// Releasing the channel to make it available for others.
|
||||||
|
// After releasing, the AntChannel instance cannot be reused.
|
||||||
|
mAntChannel.release();
|
||||||
|
mAntChannel = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.e(TAG, "Channel Closed");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements the Channel Event Handler Interface so that messages can be
|
||||||
|
* received and channel death events can be handled.
|
||||||
|
*/
|
||||||
|
public class ChannelEventCallback implements IAntChannelEventHandler {
|
||||||
|
|
||||||
|
int cnt = 0;
|
||||||
|
int eventCount = 0;
|
||||||
|
int cumulativePower = 0;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChannelDeath() {
|
||||||
|
// Display channel death message when channel dies
|
||||||
|
Log.e(TAG, "Channel Death");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReceiveMessage(MessageFromAntType messageType, AntMessageParcel antParcel) {
|
||||||
|
Log.d(TAG, "Rx: " + antParcel);
|
||||||
|
Log.d(TAG, "Message Type: " + messageType);
|
||||||
|
byte[] payload = new byte[8];
|
||||||
|
|
||||||
|
byte fe_state = 0; // RESERVED
|
||||||
|
fe_state = 1; // ASLEEP
|
||||||
|
fe_state = 2; // READY
|
||||||
|
fe_state = 3; // IN_USE
|
||||||
|
fe_state = 4; // FINISHED / PAUSE
|
||||||
|
|
||||||
|
// Switching on message type to handle different types of messages
|
||||||
|
switch (messageType) {
|
||||||
|
// If data message, construct from parcel and update channel data
|
||||||
|
case BROADCAST_DATA:
|
||||||
|
// Rx Data
|
||||||
|
//updateData(new BroadcastDataMessage(antParcel).getPayload());
|
||||||
|
break;
|
||||||
|
case ACKNOWLEDGED_DATA:
|
||||||
|
// Rx Data
|
||||||
|
//updateData(new AcknowledgedDataMessage(antParcel).getPayload());
|
||||||
|
payload = new AcknowledgedDataMessage(antParcel).getPayload();
|
||||||
|
Log.d(TAG, "AcknowledgedDataMessage: " + payload);
|
||||||
|
|
||||||
|
if ((payload[0] == 0) && (payload[1] == 1) && (payload[2] == (byte)0xAA)) {
|
||||||
|
payload[0] = (byte) 0x01;
|
||||||
|
payload[1] = (byte) 0xAC;
|
||||||
|
payload[2] = (byte) 0xFF;
|
||||||
|
payload[3] = (byte) 0xFF;
|
||||||
|
payload[4] = (byte) 0xFF;
|
||||||
|
payload[5] = (byte) 0xFF;
|
||||||
|
payload[6] = (byte) 0x00;
|
||||||
|
payload[7] = (byte) 0x00;
|
||||||
|
try {
|
||||||
|
// Setting the data to be broadcast on the next channel period
|
||||||
|
mAntChannel.setBroadcastData(payload);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
channelError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CHANNEL_EVENT:
|
||||||
|
// Constructing channel event message from parcel
|
||||||
|
ChannelEventMessage eventMessage = new ChannelEventMessage(antParcel);
|
||||||
|
EventCode code = eventMessage.getEventCode();
|
||||||
|
Log.d(TAG, "Event Code: " + code);
|
||||||
|
|
||||||
|
// Switching on event code to handle the different types of channel events
|
||||||
|
switch (code) {
|
||||||
|
case TX:
|
||||||
|
cnt += 1;
|
||||||
|
|
||||||
|
if (cnt % 66 == 64) {
|
||||||
|
payload[0] = (byte) 0x50;
|
||||||
|
payload[1] = (byte) 0xFF;
|
||||||
|
payload[2] = (byte) 0xFF;
|
||||||
|
payload[3] = (byte) 0x01;
|
||||||
|
payload[4] = (byte) 0xFF;
|
||||||
|
payload[5] = (byte) 0x00;
|
||||||
|
payload[6] = (byte) 0x01;
|
||||||
|
payload[7] = (byte) 0x00;
|
||||||
|
} else if (cnt % 66 == 65) {
|
||||||
|
payload[0] = (byte) 0x51;
|
||||||
|
payload[1] = (byte) 0xFF;
|
||||||
|
payload[2] = (byte) 0xFF;
|
||||||
|
payload[3] = (byte) 0x01;
|
||||||
|
payload[4] = (byte) ((FE_SENSOR_ID) & 0xFF);
|
||||||
|
payload[5] = (byte) ((FE_SENSOR_ID >> 8) & 0xFF);
|
||||||
|
payload[6] = (byte) ((FE_SENSOR_ID >> 16) & 0xFF);
|
||||||
|
payload[7] = (byte) ((FE_SENSOR_ID >> 24) & 0xFF);
|
||||||
|
} else if (cnt % 2 == 0) {
|
||||||
|
// PAGE 16
|
||||||
|
payload[0] = (byte) 0x10;
|
||||||
|
payload[1] = (byte) 25; // Equipment Type: 25 == Trainer / Stationary Bike
|
||||||
|
payload[2] = (byte) elapsedTime_in_0_25_seconds;
|
||||||
|
payload[3] = (byte) 0; // Distance traveled
|
||||||
|
payload[4] = (byte) 0xFF; // Speed LSB
|
||||||
|
payload[5] = (byte) 0xFF; // Speed MSB
|
||||||
|
payload[6] = (byte) 0xFF; // heart rate
|
||||||
|
payload[7] = (byte) (fe_state >> 4); // Capabilities 0:3 ; FE State Bit Field 4:7
|
||||||
|
} else {
|
||||||
|
// PAGE 25
|
||||||
|
eventCount = (eventCount + 1) & 0xFF;
|
||||||
|
cumulativePower = (cumulativePower + power) & 0xFFFF;
|
||||||
|
byte flags_bit_field;
|
||||||
|
flags_bit_field = 1; // too slow to achieve target power
|
||||||
|
flags_bit_field = 2; // too fast to achieve target power
|
||||||
|
flags_bit_field = 0; // operating at target power
|
||||||
|
|
||||||
|
payload[0] = (byte) 0x19;
|
||||||
|
payload[1] = (byte) eventCount;
|
||||||
|
payload[2] = (byte) cadence;
|
||||||
|
payload[3] = (byte) ((cumulativePower) & 0xFF);
|
||||||
|
payload[4] = (byte) ((cumulativePower >> 8) & 0xFF);
|
||||||
|
payload[5] = (byte) ((power) & 0xFF);
|
||||||
|
payload[6] = (byte) (((power >> 8) & 0xFF) | (trainerStatusBits >> 4));
|
||||||
|
payload[7] = (byte) ((flags_bit_field & 0xF) | ((fe_state >> 4) & 0xF0)); // Capabilities 0:3 ; FE State Bit Field 4:7
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mIsOpen) {
|
||||||
|
try {
|
||||||
|
// Setting the data to be broadcast on the next channel period
|
||||||
|
mAntChannel.setBroadcastData(payload);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
channelError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CHANNEL_COLLISION:
|
||||||
|
cnt += 1;
|
||||||
|
break;
|
||||||
|
case RX_SEARCH_TIMEOUT:
|
||||||
|
// TODO May want to keep searching
|
||||||
|
Log.e(TAG, "No Device Found");
|
||||||
|
break;
|
||||||
|
case CHANNEL_CLOSED:
|
||||||
|
case RX_FAIL:
|
||||||
|
case RX_FAIL_GO_TO_SEARCH:
|
||||||
|
case TRANSFER_RX_FAILED:
|
||||||
|
case TRANSFER_TX_COMPLETED:
|
||||||
|
case TRANSFER_TX_FAILED:
|
||||||
|
case TRANSFER_TX_START:
|
||||||
|
case UNKNOWN:
|
||||||
|
// TODO More complex communication will need to handle these events
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ANT_VERSION:
|
||||||
|
case BURST_TRANSFER_DATA:
|
||||||
|
case CAPABILITIES:
|
||||||
|
case CHANNEL_ID:
|
||||||
|
case CHANNEL_RESPONSE:
|
||||||
|
case CHANNEL_STATUS:
|
||||||
|
case SERIAL_NUMBER:
|
||||||
|
case OTHER:
|
||||||
|
// TODO More complex communication will need to handle these message types
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -101,7 +101,7 @@
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="Power"
|
android:text="Power corr"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/Power"
|
app:layout_constraintBottom_toTopOf="@+id/Power"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toLeftOf="@+id/guidelineleft"
|
app:layout_constraintRight_toLeftOf="@+id/guidelineleft"
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<string name="power_n0_0_w">0.0</string>
|
<string name="power_n0_0_w">0.0</string>
|
||||||
<string name="level">Level</string>
|
<string name="level">Level</string>
|
||||||
<string name="local_service_started">OpeniConsole Bluetooth active</string>
|
<string name="local_service_started">OpeniConsole Bluetooth active</string>
|
||||||
<string name="local_service_label">OpeniConsole</string>
|
<string name="local_service_label">OpeniConsole - TEST</string>
|
||||||
<string name="secure_connect">Connect to iConsole</string>
|
<string name="secure_connect">Connect to iConsole</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module external.linked.project.id=":android_antlib_4-14" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
|
||||||
<component name="FacetManager">
|
|
||||||
<facet type="android-gradle" name="Android-Gradle">
|
|
||||||
<configuration>
|
|
||||||
<option name="GRADLE_PROJECT_PATH" value=":android_antlib_4-14" />
|
|
||||||
</configuration>
|
|
||||||
</facet>
|
|
||||||
<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_7" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="library" exported="" name="android_antlib_4-14.android_antlib_4-14-0" level="project" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
|
@ -6,7 +6,7 @@ buildscript {
|
||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.4.0'
|
classpath 'com.android.tools.build:gradle:4.1.3'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Sun May 12 14:24:25 CEST 2019
|
#Mon Apr 12 12:52:47 CEST 2021
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module external.linked.project.id="iconsole-android" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" version="4">
|
<module external.linked.project.id="iconsole-android" 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">
|
<component name="FacetManager">
|
||||||
<facet type="java-gradle" name="Java-Gradle">
|
<facet type="java-gradle" name="Java-Gradle">
|
||||||
<configuration>
|
<configuration>
|
||||||
|
@ -8,11 +8,12 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
</facet>
|
</facet>
|
||||||
</component>
|
</component>
|
||||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
Loading…
Reference in a new issue