Added code to stop watch app before starting it to try to improve reliability of app start.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="uk.org.openseizuredetector"
|
||||
android:versionCode="24"
|
||||
android:versionName="2.0.3" >
|
||||
android:versionName="2.0.3a" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="14" />
|
||||
|
||||
|
||||
@@ -401,9 +401,18 @@ public class SdDataSourcePebble extends SdDataSource {
|
||||
* Attempt to start the pebble_sd watch app on the pebble watch.
|
||||
*/
|
||||
public void startWatchApp() {
|
||||
Log.v(TAG, "startWatchApp()");
|
||||
Log.v(TAG, "startWatchApp() - closing app first");
|
||||
// first close the watch app if it is running.
|
||||
PebbleKit.closeAppOnPebble(mContext, SD_UUID);
|
||||
// then start it after a 1 second delay.
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Log.v(TAG, "startWatchApp() - starting watch app...");
|
||||
PebbleKit.startAppOnPebble(mContext, SD_UUID);
|
||||
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.0.0'
|
||||
classpath 'com.android.tools.build:gradle:2.1.2'
|
||||
}
|
||||
}
|
||||
allprojects {
|
||||
|
||||
@@ -7,5 +7,6 @@
|
||||
# Location of the SDK. This is only used by Gradle.
|
||||
# For customization when using a Version Control System, please read the
|
||||
# header note.
|
||||
#Sat Apr 23 18:39:21 BST 2016
|
||||
sdk.dir=/home/graham/Android/Sdk
|
||||
#Tue Jul 19 22:15:48 BST 2016
|
||||
ndk.dir=/usr/local/android-sdk-linux/ndk-bundle
|
||||
sdk.dir=/usr/local/android-sdk-linux
|
||||
|
||||
Reference in New Issue
Block a user