Removed delay in startWatchApp because it crashed because of use of Handler.
This commit is contained in:
@@ -404,16 +404,10 @@ public class SdDataSourcePebble extends SdDataSource {
|
|||||||
Log.v(TAG, "startWatchApp() - closing app first");
|
Log.v(TAG, "startWatchApp() - closing app first");
|
||||||
// first close the watch app if it is running.
|
// first close the watch app if it is running.
|
||||||
PebbleKit.closeAppOnPebble(mContext, SD_UUID);
|
PebbleKit.closeAppOnPebble(mContext, SD_UUID);
|
||||||
// then start it after a 1 second delay.
|
// then start it.
|
||||||
final Handler handler = new Handler();
|
|
||||||
handler.postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Log.v(TAG, "startWatchApp() - starting watch app...");
|
Log.v(TAG, "startWatchApp() - starting watch app...");
|
||||||
PebbleKit.startAppOnPebble(mContext, SD_UUID);
|
PebbleKit.startAppOnPebble(mContext, SD_UUID);
|
||||||
}
|
}
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* stop the pebble_sd watch app on the pebble watch.
|
* stop the pebble_sd watch app on the pebble watch.
|
||||||
|
|||||||
Reference in New Issue
Block a user