Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Update spokestack android version #112

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ docs/

# jest
coverage/
.env
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
buildToolsVersion getExtOrDefault('buildToolsVersion')
defaultConfig {
minSdkVersion 21
minSdkVersion 24
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
versionCode 1
versionName "1.0"
Expand Down Expand Up @@ -121,7 +121,7 @@ dependencies {
// noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_version"
api 'io.spokestack:spokestack-android:11.4.1'
api 'io.spokestack:spokestack-android:11.5.2'

// for TensorFlow Lite-powered wakeword detection and/or NLU
implementation 'org.tensorflow:tensorflow-lite:2.3.0'
Expand Down
6 changes: 3 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Spokestack_kotlinVersion=1.4.32
Spokestack_kotlinxVersion=1.4.2
Spokestack_kotlinVersion=1.6.0
Spokestack_kotlinxVersion=1.6.0
Spokestack_compileSdkVersion=30
Spokestack_buildToolsVersion=30.0.2
Spokestack_targetSdkVersion=30
Spokestack_targetSdkVersion=31
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class SpokestackModule(private val reactContext: ReactApplicationContext): React

downloader = Downloader(
reactContext.applicationContext,
if (config.hasKey("allowCellular")) config.getBoolean("allowCellular") else false,
if (config.hasKey("allowCellularDownloads")) config.getBoolean("allowCellularDownloads") else false,
if (config.hasKey("refreshModels")) config.getBoolean("refreshModels") else false
)

Expand Down
11 changes: 9 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ The voice can be changed if you have created a custom voice using a [Spokestack
Set these variables in your environment...

```sh
export SPOKESTACK_CLIENT_ID=$CLIENT_IDENTITY
export SPOKESTACK_CLIENT_SECRET=$CLIENT_SECRET_KEY
export REACT_APP_SPOKESTACK_CLIENT_ID=$CLIENT_IDENTITY
export REACT_APP_SPOKESTACK_CLIENT_SECRET=$CLIENT_SECRET_KEY
```

or create a .env file on example folder and the following variables.

```sh
REACT_APP_SPOKESTACK_CLIENT_ID=
REACT_APP_SPOKESTACK_CLIENT_SECRET=
```

Now that you have tokens in place, the app can be run as normal.
Expand Down
4 changes: 3 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:largeHeap="true">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
Expand Down
15 changes: 11 additions & 4 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 24
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
compileSdkVersion = 31
targetSdkVersion = 31
ndkVersion = "21.4.7075529"
kotlinVersion = '1.6.0'
androidXCore = "1.7.0"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.1")

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -36,4 +38,9 @@ allprojects {
google()
maven { url 'https://www.jitpack.io' }
}
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.6.0'
}
}
}
1 change: 1 addition & 0 deletions example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
'transform-inline-environment-variables',
'module:react-native-dotenv',
[
'module-resolver',
{
Expand Down
Loading