This repository has been archived by the owner on Jun 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Virtual Assistant Client for Android - initial public commit (#1493)
* Virtual Assistant Client for Android - initial public commit * updated .gitignore to ensure the /src/debug folder is not ignored
- Loading branch information
Showing
190 changed files
with
17,138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -371,3 +371,4 @@ ASALocalRun/ | |
*.lzma | ||
*.cab | ||
.DS_Store | ||
/.project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
!/src/debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 28 | ||
defaultConfig { | ||
applicationId "com.microsoft.bot.builder.solutions.virtualassistant" | ||
minSdkVersion 24 | ||
targetSdkVersion 28 | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(include: ['*.jar'], dir: 'libs') | ||
|
||
// Android Support | ||
implementation 'com.android.support:recyclerview-v7:28.0.0' | ||
implementation 'com.android.support:appcompat-v7:28.0.0' | ||
implementation 'com.android.support.constraint:constraint-layout:1.1.3' | ||
implementation 'com.android.support:design:28.0.0' | ||
|
||
// Butterknife | ||
implementation 'com.jakewharton:butterknife:8.8.1' | ||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' | ||
|
||
// for Events | ||
implementation 'org.greenrobot:eventbus:3.1.1' | ||
|
||
// for adaptive card rendering, see https://mvnrepository.com/artifact/io.adaptivecards/adaptivecards-android | ||
implementation 'io.adaptivecards:adaptivecards-android:1.2.0-beta1' | ||
|
||
// JSON | ||
implementation "com.google.code.gson:gson:2.8.4" | ||
|
||
// rxJava | ||
implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.7.0@aar' | ||
implementation 'io.reactivex:rxandroid:1.2.1' | ||
implementation 'io.reactivex:rxjava:1.1.6' | ||
|
||
// Material Dialogs | ||
implementation 'com.afollestad.material-dialogs:core:0.9.6.0' | ||
|
||
// fused API | ||
implementation "com.google.android.gms:play-services-location:16.0.0" | ||
implementation "com.android.support:support-media-compat:28.0.0" | ||
//fixes fused API outdated library | ||
implementation "com.android.support:support-v4:28.0.0"//fixes fused API outdated library | ||
|
||
// Direct Line Speech (local module) | ||
implementation project(':directlinespeech') | ||
} |
21 changes: 21 additions & 0 deletions
21
solutions/android/VirtualAssistantClient/app/proguard-rules.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
22 changes: 22 additions & 0 deletions
22
...bot/builder/solutions/virtualassistant/activities/configuration/DefaultConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.microsoft.bot.builder.solutions.virtualassistant.activities.configuration; | ||
|
||
public class DefaultConfiguration { | ||
|
||
// Replace below with your own subscription key | ||
public static final String COGNITIVE_SERVICES_SUBSCRIPTION_KEY = "YOUR_KEY_HERE";//TODO | ||
|
||
public static final String BOT_ID = "YOUR_BOT_ID_HERE";//TODO | ||
|
||
public static final String SPEECH_REGION = "westus2"; | ||
|
||
public static final String VOICE_NAME = "Microsoft Server Speech Text to Speech Voice (en-US, JessaNeural)"; | ||
|
||
public static final String DIRECT_LINE_CONSTANT = "directline"; | ||
public static final String USER_NAME = "User"; | ||
public static final String USER_ID = "YOUR_USER_ID_HERE";//TODO | ||
|
||
public static final String LOCALE = "en-us"; | ||
|
||
public static final String GEOLOCATION_LAT = "47.617305"; | ||
public static final String GEOLOCATION_LON = "-122.192217"; | ||
} |
109 changes: 109 additions & 0 deletions
109
solutions/android/VirtualAssistantClient/app/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.microsoft.bot.builder.solutions.virtualassistant"> | ||
<!-- | ||
for an overview of permissions, see : | ||
https://developer.android.com/guide/topics/permissions/overview | ||
--> | ||
<!-- NORMAL --> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- for ContextCompat.startForegroundService --> | ||
<!-- DANGEROUS --> | ||
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <!-- FOR SPEECH COMMANDS --> | ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
|
||
<application | ||
android:name=".MainApplication" | ||
android:allowBackup="true" | ||
android:fullBackupContent="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
|
||
<!-- android:windowSoftInputMode="adjustPan" prevents keyboard from hiding TextInputEditText's --> | ||
<activity | ||
android:name=".activities.main.MainActivity" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme.NoActionBar" | ||
android:windowSoftInputMode="adjustPan|stateAlwaysHidden"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity | ||
android:name=".assistant.VoiceInteractionActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
<category android:name="android.intent.category.VOICE" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity | ||
android:name=".activities.botconfiguration.BotConfigurationActivity" | ||
android:theme="@style/AppTheme.NoActionBar" | ||
android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | ||
|
||
<activity | ||
android:name=".activities.configuration.AppConfigurationActivity" | ||
android:theme="@style/AppTheme.NoActionBar" | ||
android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | ||
|
||
<!-- WIDGETS --> | ||
<receiver android:name=".widgets.WidgetTalkButton"> | ||
<intent-filter> | ||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> | ||
</intent-filter> | ||
|
||
<meta-data | ||
android:name="android.appwidget.provider" | ||
android:resource="@xml/widget_talk_button_info" /> | ||
</receiver> | ||
|
||
<receiver android:name=".widgets.WidgetBotRequest"> | ||
<intent-filter> | ||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> | ||
</intent-filter> | ||
|
||
<meta-data | ||
android:name="android.appwidget.provider" | ||
android:resource="@xml/widget_bot_request_info" /> | ||
</receiver> | ||
|
||
<receiver android:name=".widgets.WidgetBotResponse"> | ||
<intent-filter> | ||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> | ||
</intent-filter> | ||
|
||
<meta-data | ||
android:name="android.appwidget.provider" | ||
android:resource="@xml/widget_bot_response_info" /> | ||
</receiver> | ||
|
||
<service | ||
android:name=".service.SpeechService" | ||
android:enabled="true" | ||
android:exported="true" /> <!-- ASSISTANT --> | ||
|
||
<service | ||
android:name=".assistant.AssistantService" | ||
android:permission="android.permission.BIND_VOICE_INTERACTION"> | ||
<meta-data | ||
android:name="android.voice_interaction" | ||
android:resource="@xml/assistant_service" /> | ||
<intent-filter> | ||
<action android:name="android.service.voice.VoiceInteractionService" /> | ||
</intent-filter> | ||
</service> | ||
|
||
<service | ||
android:name=".assistant.AssistantSessionService" | ||
android:permission="android.permission.BIND_VOICE_INTERACTION" /> | ||
|
||
</application> | ||
|
||
</manifest> |
Binary file added
BIN
+4.74 MB
solutions/android/VirtualAssistantClient/app/src/main/assets/keywords/computer/kws.table
Binary file not shown.
Oops, something went wrong.