Moved to use v3 of Pebblekit library for compatibility with Pebble Time. - Release 2.0a for testing.

This commit is contained in:
Graham Jones
2016-01-16 19:16:58 +00:00
parent 6d4c2495b8
commit be7814c9b8
7 changed files with 17 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
android:versionCode="17"
android:versionName="2.0a" >
<uses-sdk android:minSdkVersion="11" />
<uses-sdk android:minSdkVersion="14" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

View File

@@ -94,7 +94,6 @@ public class SdDataSourcePebble extends SdDataSource {
private int DATA_TYPE_RESULTS = 1; // Analysis Results
private int DATA_TYPE_SETTINGS = 2; // Settings
private int DATA_TYPE_SPEC = 3; // FFT Spectrum (or part of a spectrum)
public SdDataSourcePebble(Context context, SdDataReceiver sdDataReceiver) {
super(context,sdDataReceiver);
mName = "Pebble";
@@ -344,6 +343,9 @@ public class SdDataSourcePebble extends SdDataSource {
}
};
PebbleKit.registerReceivedDataHandler(mContext, msgDataHandler);
// We struggle to connect to pebble time if app is already running, so stop app so we can
// re-connect to it.
stopWatchApp();
}
/**

View File

@@ -636,7 +636,7 @@ public class SdServer extends Service implements SdDataReceiver {
SharedPreferences SP = PreferenceManager
.getDefaultSharedPreferences(getBaseContext());
try {
mSdDataSourceName = SP.getString("DataSource", "undefined");
mSdDataSourceName = SP.getString("DataSource", "Pebble");
Log.v(TAG, "updatePrefs() - DataSource = " + mSdDataSourceName);
mLatchAlarms = SP.getBoolean("LatchAlarms", false);
Log.v(TAG, "updatePrefs() - mLatchAlarms = " + mLatchAlarms);