├── mobile ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── mycroft_big.png │ │ │ │ ├── mycroft_logo_24dp.png │ │ │ │ ├── kb_to_mic.xml │ │ │ │ ├── ic_send_black_24dp.xml │ │ │ │ ├── volume_toggle.xml │ │ │ │ ├── ic_baseline_person_24.xml │ │ │ │ ├── ic_mic_black_24dp.xml │ │ │ │ ├── ic_volume_up_black_24dp.xml │ │ │ │ ├── ic_keyboard_black_24dp.xml │ │ │ │ ├── ic_volume_off_black_24dp.xml │ │ │ │ ├── ic_info_black_24dp.xml │ │ │ │ ├── ic_notifications_black_24dp.xml │ │ │ │ └── ic_sync_black_24dp.xml │ │ │ ├── drawable-hdpi │ │ │ │ └── ic_mycroft.png │ │ │ ├── drawable-mdpi │ │ │ │ └── ic_mycroft.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── ic_mycroft.png │ │ │ ├── drawable-xxhdpi │ │ │ │ └── ic_mycroft.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_mycroft.png │ │ │ ├── values │ │ │ │ ├── wear.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── values-v14 │ │ │ │ └── dimens.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── menu │ │ │ │ ├── menu_user_utterance_context.xml │ │ │ │ ├── menu_mycroft_utterance_context.xml │ │ │ │ └── menu_setup.xml │ │ │ ├── xml │ │ │ │ ├── mycroft_app_widget_info.xml │ │ │ │ ├── pref_about.xml │ │ │ │ ├── pref_general.xml │ │ │ │ ├── pref_data_sync.xml │ │ │ │ ├── pref_headers.xml │ │ │ │ └── pref_notification.xml │ │ │ └── layout │ │ │ │ ├── activity_display.xml │ │ │ │ ├── mycroft_app_widget.xml │ │ │ │ ├── activity_discovery.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── mycroft_card_layout.xml │ │ │ │ ├── user_card_layout.xml │ │ │ │ └── content_main.xml │ │ ├── java │ │ │ ├── mycroft │ │ │ │ └── ai │ │ │ │ │ ├── UtterenceFrom.kt │ │ │ │ │ ├── Utterance.kt │ │ │ │ │ ├── Constants.kt │ │ │ │ │ ├── SafeCallback.kt │ │ │ │ │ ├── utils │ │ │ │ │ ├── PlayServicesUtil.kt │ │ │ │ │ ├── NetworkUtil.kt │ │ │ │ │ └── NetworkAutoDiscoveryUtil.kt │ │ │ │ │ ├── receivers │ │ │ │ │ └── NetworkChangeReceiver.kt │ │ │ │ │ ├── MessageParser.kt │ │ │ │ │ ├── services │ │ │ │ │ └── MycroftWearListenerService.kt │ │ │ │ │ ├── adapters │ │ │ │ │ └── MycroftAdapter.kt │ │ │ │ │ ├── AppCompatPreferenceActivity.kt │ │ │ │ │ ├── TTSManager.kt │ │ │ │ │ ├── DiscoveryActivity.kt │ │ │ │ │ ├── SettingsActivity.kt │ │ │ │ │ └── MainActivity.kt │ │ │ └── layout │ │ │ │ └── MycroftAppWidget.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── mycroft │ │ │ └── ai │ │ │ ├── ExampleUnitTest.java │ │ │ ├── LogAnswer.java │ │ │ └── TTSManagerTest.java │ └── androidTest │ │ └── java │ │ └── mycroft │ │ └── ai │ │ └── ExampleInstrumentationTest.java ├── proguard-rules.pro └── build.gradle.kts ├── shared ├── .gitignore ├── proguard-rules.pro ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── mycroft │ │ │ └── ai │ │ │ └── shared │ │ │ ├── wear │ │ │ └── Constants.kt │ │ │ └── utilities │ │ │ └── GuiUtilities.kt │ ├── test │ │ └── java │ │ │ └── mycroft │ │ │ └── ai │ │ │ └── shared │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── mycroft │ │ └── ai │ │ └── shared │ │ └── ExampleInstrumentedTest.java └── build.gradle.kts ├── wear ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── drawable │ │ │ └── mycroft_logo.png │ │ ├── drawable-hdpi │ │ │ └── ic_mycroft.png │ │ ├── drawable-mdpi │ │ │ └── ic_mycroft.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_mycroft.png │ │ ├── drawable-xhdpi │ │ │ └── ic_mycroft.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_mycroft.png │ │ ├── values │ │ │ ├── wear.xml │ │ │ └── strings.xml │ │ └── layout │ │ │ └── activity_main.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── mycroft │ │ └── ai │ │ └── MainActivity.kt ├── proguard-rules.pro └── build.gradle.kts ├── settings.gradle.kts ├── .gitignore ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /mobile/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /shared/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /wear/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | include(":mobile", ":wear", ":shared") 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | .idea 4 | local.properties 5 | .DS_Store 6 | .gradle/ 7 | build/ 8 | /captures -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /wear/src/main/res/drawable/mycroft_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/wear/src/main/res/drawable/mycroft_logo.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/mycroft_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/drawable/mycroft_big.png -------------------------------------------------------------------------------- /wear/src/main/res/drawable-hdpi/ic_mycroft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/wear/src/main/res/drawable-hdpi/ic_mycroft.png -------------------------------------------------------------------------------- /wear/src/main/res/drawable-mdpi/ic_mycroft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/wear/src/main/res/drawable-mdpi/ic_mycroft.png -------------------------------------------------------------------------------- /wear/src/main/res/mipmap-xxhdpi/ic_mycroft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/wear/src/main/res/mipmap-xxhdpi/ic_mycroft.png -------------------------------------------------------------------------------- /mobile/src/main/java/mycroft/ai/UtterenceFrom.kt: -------------------------------------------------------------------------------- 1 | package mycroft.ai 2 | 3 | enum class UtteranceFrom(val id: Int) { 4 | USER(0), 5 | MYCROFT(1) 6 | } -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-hdpi/ic_mycroft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/drawable-hdpi/ic_mycroft.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-mdpi/ic_mycroft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/drawable-mdpi/ic_mycroft.png -------------------------------------------------------------------------------- /mobile/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /wear/src/main/res/drawable-xhdpi/ic_mycroft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/wear/src/main/res/drawable-xhdpi/ic_mycroft.png -------------------------------------------------------------------------------- /wear/src/main/res/drawable-xxhdpi/ic_mycroft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/wear/src/main/res/drawable-xxhdpi/ic_mycroft.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xhdpi/ic_mycroft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/drawable-xhdpi/ic_mycroft.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable-xxhdpi/ic_mycroft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/drawable-xxhdpi/ic_mycroft.png -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/mycroft_logo_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/drawable/mycroft_logo_24dp.png -------------------------------------------------------------------------------- /mobile/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /mobile/src/main/res/mipmap-xxxhdpi/ic_mycroft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MycroftAI/Mycroft-Android/HEAD/mobile/src/main/res/mipmap-xxxhdpi/ic_mycroft.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Jun 14 22:20:10 PDT 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip 7 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/kb_to_mic.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/ic_send_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/volume_toggle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/ic_baseline_person_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/ic_mic_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/ic_volume_up_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/ic_keyboard_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /mobile/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /opt/android-sdks/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /shared/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/joe/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /wear/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\jpoff\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/ic_volume_off_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | android.useAndroidX=true 19 | 20 | android.enableJetifier=true 21 | -------------------------------------------------------------------------------- /shared/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | Shared 23 | 24 | -------------------------------------------------------------------------------- /mobile/src/main/java/mycroft/ai/Utterance.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Mycroft AI, Inc. 3 | * 4 | * This file is part of Mycroft-Android a client for Mycroft Core. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | * 19 | */ 20 | 21 | package mycroft.ai 22 | 23 | /** 24 | * Data class representing a response from Mycroft or command from the user 25 | */ 26 | data class Utterance(val utterance: String, val from: UtteranceFrom) -------------------------------------------------------------------------------- /wear/src/main/res/values/wear.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 24 | query_mycroft_capability 25 | 26 | -------------------------------------------------------------------------------- /mobile/src/main/res/values/wear.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 24 | query_mycroft_capability 25 | 26 | -------------------------------------------------------------------------------- /wear/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | Mycroft-Android 23 | Say something to Mycroft… 24 | Sorry! Your device doesn\'t support speech input 25 | 26 | -------------------------------------------------------------------------------- /shared/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /mobile/src/main/java/mycroft/ai/Constants.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Mycroft AI, Inc. 3 | * 4 | * This file is part of Mycroft-Android a client for Mycroft Core. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | * 19 | */ 20 | 21 | package mycroft.ai 22 | 23 | class Constants { 24 | object MycroftMobileConstants { 25 | //how to properly call constants in kotlin? 26 | const val VERSION_NAME_PREFERENCE_KEY = "versionName" 27 | const val VERSION_CODE_PREFERENCE_KEY = "versionCode" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /mobile/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | #22A7F0 24 | #4990e2 25 | #80c3f3 26 | #E1F5FE 27 | 28 | -------------------------------------------------------------------------------- /mobile/src/main/res/values-v14/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 24 | 28 | 0dp 29 | 30 | -------------------------------------------------------------------------------- /mobile/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /mobile/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | 25 | 64dp 26 | 27 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/ic_info_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 26 | 29 | 30 | -------------------------------------------------------------------------------- /mobile/src/test/java/mycroft/ai/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Mycroft AI, Inc. 3 | * 4 | * This file is part of Mycroft-Android a client for Mycroft Core. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | * 19 | */ 20 | 21 | package mycroft.ai; 22 | 23 | import org.junit.Test; 24 | 25 | import static org.junit.Assert.*; 26 | 27 | /** 28 | * Example local unit test, which will execute on the development machine (host). 29 | * 30 | * @see Testing documentation 31 | */ 32 | public class ExampleUnitTest { 33 | @Test 34 | public void addition_isCorrect() throws Exception { 35 | assertEquals(4, 2 + 2); 36 | } 37 | } -------------------------------------------------------------------------------- /mobile/src/main/res/menu/menu_user_utterance_context.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 24 | 25 | 29 | 30 | 34 | -------------------------------------------------------------------------------- /shared/src/test/java/mycroft/ai/shared/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Mycroft AI, Inc. 3 | * 4 | * This file is part of Mycroft-Android a client for Mycroft Core. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | * 19 | */ 20 | 21 | package mycroft.ai.shared; 22 | 23 | import org.junit.Test; 24 | 25 | import static org.junit.Assert.*; 26 | 27 | /** 28 | * Example local unit test, which will execute on the development machine (host). 29 | * 30 | * @see Testing documentation 31 | */ 32 | public class ExampleUnitTest { 33 | @Test 34 | public void addition_isCorrect() throws Exception { 35 | assertEquals(4, 2 + 2); 36 | } 37 | } -------------------------------------------------------------------------------- /mobile/src/main/res/menu/menu_mycroft_utterance_context.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 24 | 25 | 29 | 30 | 34 | -------------------------------------------------------------------------------- /mobile/src/main/java/mycroft/ai/SafeCallback.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Mycroft AI, Inc. 3 | * 4 | * This file is part of Mycroft-Android a client for Mycroft Core. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | * 19 | */ 20 | 21 | package mycroft.ai 22 | 23 | import java.util.concurrent.Callable 24 | 25 | /** 26 | * Inversion of the [java.util.concurrent.Callable] interface. 27 | * 28 | * 29 | * Note that the [.call] method in this class is 30 | * not allowed to throw exceptions. 31 | * 32 | * 33 | * @author Philip Cohn-Cort 34 | */ 35 | interface SafeCallback { 36 | /** 37 | * Variant of [Callable.call] 38 | * @param param any value. May be null. 39 | */ 40 | fun call(param: T) 41 | } 42 | -------------------------------------------------------------------------------- /shared/src/main/java/mycroft/ai/shared/wear/Constants.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Mycroft AI, Inc. 3 | * 4 | * This file is part of Mycroft-Android a client for Mycroft Core. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | * 19 | */ 20 | 21 | package mycroft.ai.shared.wear 22 | 23 | /** 24 | * Created by joe on 12/21/16. 25 | */ 26 | 27 | class Constants { 28 | object MycroftSharedConstants { 29 | const val MYCROFT_QUERY_MESSAGE_PATH = "/mycroft_query" 30 | const val MYCROFT_WEAR_REQUEST = "mycroft.ai.wear.request" 31 | const val MYCROFT_WEAR_REQUEST_KEY_NAME = "MYCROFT_WEAR_REQUEST" 32 | const val MYCROFT_WEAR_REQUEST_MESSAGE = "mycroft.ai.wear.request.message" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/ic_notifications_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 26 | 29 | 30 | -------------------------------------------------------------------------------- /mobile/src/main/res/drawable/ic_sync_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 26 | 29 | -------------------------------------------------------------------------------- /mobile/src/main/res/xml/mycroft_app_widget_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 31 | 32 | -------------------------------------------------------------------------------- /mobile/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | 23 | 16dp 24 | 16dp 25 | 12dp 26 | 27 | 31 | 8dp 32 | 40dp 33 | 60dp 34 | 35 | -------------------------------------------------------------------------------- /mobile/src/main/res/layout/activity_display.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 29 | 30 | 35 | -------------------------------------------------------------------------------- /mobile/src/main/res/xml/pref_about.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | 23 | 27 | 28 | 32 | 33 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /mobile/src/main/res/layout/mycroft_app_widget.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 26 | 27 | 28 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /mobile/src/main/res/menu/menu_setup.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 25 | 26 | 31 | 32 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /shared/src/main/java/mycroft/ai/shared/utilities/GuiUtilities.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Mycroft AI, Inc. 3 | * 4 | * This file is part of Mycroft-Android a client for Mycroft Core. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | * 19 | */ 20 | 21 | package mycroft.ai.shared.utilities 22 | 23 | import android.content.Context 24 | import android.view.Gravity 25 | import android.widget.LinearLayout 26 | import android.widget.TextView 27 | import android.widget.Toast 28 | 29 | /** 30 | * Created by joe on 12/21/16. 31 | */ 32 | 33 | object GuiUtilities { 34 | fun showToast(context: Context, message: String) { 35 | val toast = Toast.makeText(context, message, Toast.LENGTH_SHORT) 36 | 37 | val layout = toast.view as LinearLayout 38 | if (layout.childCount > 0) { 39 | val tv = layout.getChildAt(0) as TextView 40 | tv.gravity = Gravity.CENTER_VERTICAL or Gravity.CENTER_HORIZONTAL 41 | } 42 | 43 | toast.show() 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /mobile/src/androidTest/java/mycroft/ai/ExampleInstrumentationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Mycroft AI, Inc. 3 | * 4 | * This file is part of Mycroft-Android a client for Mycroft Core. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | * 19 | */ 20 | 21 | package mycroft.ai; 22 | 23 | import androidx.test.ext.junit.runners.AndroidJUnit4; 24 | 25 | import org.junit.Test; 26 | import org.junit.runner.RunWith; 27 | 28 | /** 29 | * Instrumentation test, which will execute on an Android device. 30 | * 31 | * @see Testing documentation 32 | */ 33 | //@MediumTest 34 | @RunWith(AndroidJUnit4.class) 35 | public class ExampleInstrumentationTest { 36 | @Test 37 | public void useAppContext() throws Exception { 38 | // TODO Fix below 39 | // Context of the app under test. 40 | // Context appContext = InstrumentationRegistry.getTargetContext(); 41 | //assertEquals("mycroft.ai", appContext.getPackageName()); 42 | } 43 | } -------------------------------------------------------------------------------- /shared/src/androidTest/java/mycroft/ai/shared/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017. Mycroft AI, Inc. 3 | * 4 | * This file is part of Mycroft-Android a client for Mycroft Core. 5 | * 6 | * This program is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | * 19 | */ 20 | 21 | package mycroft.ai.shared; 22 | 23 | import androidx.test.runner.AndroidJUnit4; 24 | 25 | import org.junit.Test; 26 | import org.junit.runner.RunWith; 27 | 28 | /** 29 | * Instrumentation test, which will execute on an Android device. 30 | * 31 | * @see Testing documentation 32 | */ 33 | @RunWith(AndroidJUnit4.class) 34 | public class ExampleInstrumentedTest { 35 | @Test 36 | public void useAppContext() throws Exception { 37 | // TODO Fix below 38 | // Context of the app under test. 39 | //Context appContext = InstrumentationRegistry.getTargetContext(); 40 | 41 | //assertEquals("mycroft.ai.shared.test", appContext.getPackageName()); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /wear/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 28 | 29 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /mobile/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | 23 | 24 | 32 | 33 | 37 | 38 |