Minor fixes and updates
This commit is contained in:
parent
3a009c8e16
commit
90acf12ece
9 changed files with 46 additions and 39 deletions
|
|
@ -3,9 +3,10 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.0'
|
||||
classpath 'com.android.tools.build:gradle:3.0.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
@ -15,6 +16,7 @@ buildscript {
|
|||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
|||
#Wed Mar 08 09:28:23 CET 2017
|
||||
#Sun Oct 29 20:48:40 CET 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@ apply plugin: 'com.android.application'
|
|||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.3'
|
||||
buildToolsVersion '26.0.2'
|
||||
flavorDimensions "HubOne"
|
||||
|
||||
def String VERSION
|
||||
String VERSION
|
||||
|
||||
lintOptions {
|
||||
disable 'MissingTranslation';
|
||||
abortOnError false;
|
||||
disable 'MissingTranslation'
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
|
|
@ -43,6 +44,7 @@ android {
|
|||
|
||||
productFlavors {
|
||||
dbg {
|
||||
dimension "HubOne"
|
||||
signingConfig signingConfigs.dbg
|
||||
versionCode 1
|
||||
versionName VERSION + " (dbg)"
|
||||
|
|
@ -50,6 +52,7 @@ android {
|
|||
}
|
||||
|
||||
full {
|
||||
dimension "HubOne"
|
||||
signingConfig signingConfigs.full
|
||||
versionCode 1
|
||||
versionName VERSION
|
||||
|
|
@ -73,7 +76,7 @@ android {
|
|||
}
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
variant.outputs.all { output ->
|
||||
def project = project.name
|
||||
def SEP = "-"
|
||||
def values = variant.versionName.split(" ");
|
||||
|
|
@ -118,7 +121,7 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
output.outputFile = new File(output.outputFile.parent, newApkName)
|
||||
output.outputFileName = new File(output.outputFile.parent, newApkName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -130,9 +133,9 @@ dependencies {
|
|||
})
|
||||
|
||||
compile project(':library')
|
||||
compile 'com.android.support:appcompat-v7:25.3.1'
|
||||
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9'
|
||||
compile 'com.google.code.gson:gson:2.7'
|
||||
compile 'com.android.support:appcompat-v7:25.4.0'
|
||||
compile 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
compile 'com.google.code.gson:gson:2.8.0'
|
||||
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class VoiXtremeCalibrate {
|
|||
|
||||
Intent intent = mContext.getPackageManager().getLaunchIntentForPackage(CALIBRATE_PACKAGE_NAME);
|
||||
if (intent == null) {
|
||||
informResultAndExit(VoiXtremeCalibrateListener.CALIBRATE_STATUS_VOIXTREME_CALIBRATE_MISSING);
|
||||
informResultAndExit(VxtCommon.Calibrate.CALIBRATE_STATUS_VOIXTREME_CALIBRATE_MISSING);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ public class VoiXtremeCalibrate {
|
|||
@Override
|
||||
public void run() {
|
||||
|
||||
informResultAndExit(VoiXtremeCalibrateListener.CALIBRATE_STATUS_TIMEOUT);
|
||||
informResultAndExit(VxtCommon.Calibrate.CALIBRATE_STATUS_TIMEOUT);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -102,13 +102,22 @@ public class VoiXtremeCalibrate {
|
|||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
|
||||
if (intent.getAction() == null || intent.getExtras() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (intent.getAction().equals(RETURN_ACTION)) {
|
||||
int status = intent.getExtras().getInt(BroadcastParams.EXTRAS_STATUS, -1);
|
||||
|
||||
if (status == VxtCommon.Calibrate.CALIBRATE_STATUS_STARTED) {
|
||||
Log.i(TAG, "Calibrate started OK");
|
||||
mHandler.removeCallbacks(mTimeoutRunnable);
|
||||
} else {
|
||||
}
|
||||
else if (status == VxtCommon.Calibrate.CALIBRATE_STATUS_TERMINATED) {
|
||||
Log.i(TAG, "Calibrate terminated");
|
||||
informResultAndExit(VxtCommon.Calibrate.CALIBRATE_STATUS_OK);
|
||||
}
|
||||
else {
|
||||
Log.i(TAG, "Calibrate status: " + status);
|
||||
informResultAndExit(status);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,14 +6,6 @@ package com.voixtreme.api;
|
|||
|
||||
public interface VoiXtremeCalibrateListener {
|
||||
|
||||
int CALIBRATE_STATUS_OK = 0;
|
||||
int CALIBRATE_STATUS_VOIXTREME_SERVICE_MISSING = 1;
|
||||
int CALIBRATE_STATUS_VOIXTREME_CALIBRATE_MISSING = 2;
|
||||
int CALIBRATE_STATUS_TIMEOUT = 3;
|
||||
int CALIBRATE_STATUS_PERMISSION_DENIED = 4;
|
||||
int CALIBRATE_STATUS_CONFIGURATION_ERROR = 5;
|
||||
int CALIBRATE_STATUS_INTERNAL_ERROR = 6;
|
||||
|
||||
/**
|
||||
* Receive acknowledge when the voiXtreme Calibrate APP has terminated
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
package com.voixtreme.voicepickingdemo;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.widget.Toast;
|
||||
import android.util.Log;
|
||||
|
||||
import com.dixitmobile.common.ToastHelper;
|
||||
import com.dixitmobile.common.VerifyPermissions;
|
||||
import com.dixitmobile.common.voixtreme.VxtCommon;
|
||||
import com.voixtreme.api.VoiXtremeCalibrate;
|
||||
import com.voixtreme.api.VoiXtremeCalibrateListener;
|
||||
|
||||
|
|
@ -31,25 +32,23 @@ public class SplashScreen extends AppCompatActivity
|
|||
|
||||
private void startCalibrate() {
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
startMainActivity();
|
||||
} else {
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
VoiXtremeCalibrate calibrate = new VoiXtremeCalibrate(getApplicationContext());
|
||||
calibrate.startCalibrateApp(SplashScreen.this);
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
VoiXtremeCalibrate calibrate = new VoiXtremeCalibrate(getApplicationContext());
|
||||
calibrate.startCalibrateApp(SplashScreen.this);
|
||||
}
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void OnCalibrateFinished(int status) {
|
||||
|
||||
if (status != VoiXtremeCalibrateListener.CALIBRATE_STATUS_OK) {
|
||||
Toast.makeText(getApplicationContext(), R.string.error_opening_voixtreme_calibrate, Toast.LENGTH_LONG).show();
|
||||
Log.d("SplashScreen", "eml: status received: " + status);
|
||||
|
||||
if (status != VxtCommon.Calibrate.CALIBRATE_STATUS_OK) {
|
||||
ToastHelper.toastErrorLong(getApplicationContext(), R.string.error_opening_voixtreme_calibrate);
|
||||
} else {
|
||||
startMainActivity();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/mainBackground"
|
||||
android:keepScreenOn="true"
|
||||
android:padding="0dp"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
|
|
@ -24,7 +25,6 @@
|
|||
android:layout_above="@+id/response"
|
||||
android:layout_toEndOf="@id/logo_voixtreme"
|
||||
android:layout_toStartOf="@+id/images"
|
||||
android:keepScreenOn="true"
|
||||
android:padding="8dp" />
|
||||
|
||||
<TextView
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/mainBackground"
|
||||
android:keepScreenOn="true"
|
||||
android:padding="0dp"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:keepScreenOn="true"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="0dp"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue