Skip to content

Commit

Permalink
Add xDrip-Pebble-E (Clay) watchface
Browse files Browse the repository at this point in the history
  • Loading branch information
jamorham committed Sep 22, 2016
1 parent 5d2205a commit 66afd53
Show file tree
Hide file tree
Showing 13 changed files with 363 additions and 143 deletions.
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@
<activity
android:name=".UtilityModels.pebble.watchface.InstallPebbleClassicTrendWatchface"
android:label="@string/install_pebble_classic_trend_watchface" />
<activity
android:name=".UtilityModels.pebble.watchface.InstallPebbleTrendClayWatchFace"
android:label="Install Pebble Clay Watchface" />
<activity
android:name=".UtilityModels.pebble.watchface.InstallPebbleSnoozeControlApp"
android:label="@string/install_pebble_snooze_control_app" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import com.getpebble.android.kit.PebbleKit;
import com.getpebble.android.kit.util.PebbleDictionary;

import java.util.UUID;

/**
* Created by andy on 02/06/16.
*/
Expand Down Expand Up @@ -44,7 +46,13 @@ public void receiveAck(int transactionId) {
}

public void receiveAppData(int transactionId, PebbleDictionary data) {
// default no implementation
// handle app incoming data
PebbleWatchSync.receiveAppData(transactionId, data);
}

public UUID watchfaceUUID()
{
return PebbleWatchSync.PEBBLEAPP_UUID;
}

@Override
Expand Down Expand Up @@ -137,7 +145,7 @@ public boolean getBooleanValue(String key, boolean defaultValue) {


public void sendDataToPebble(PebbleDictionary data) {
PebbleKit.sendDataToPebble(this.context, PebbleWatchSync.PEBBLEAPP_UUID, data);
PebbleKit.sendDataToPebble(this.context, watchfaceUUID(), data);
}


Expand All @@ -160,6 +168,7 @@ public void addBatteryStatusToDictionary(PebbleDictionary dictionary) {
}



public String getBgReading() {
return this.bgGraphBuilder.unitized_string(this.bgReading.calculated_value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import com.eveningoutpost.dexdrip.UtilityModels.BgGraphBuilder;
import com.getpebble.android.kit.util.PebbleDictionary;

import java.util.UUID;

/**
* Created by andy on 02/06/16.
*/
Expand Down Expand Up @@ -40,4 +42,10 @@ public interface PebbleDisplayInterface {
*/
void initDisplay(Context context, PebbleWatchSync pebbleWatchSync, BgGraphBuilder bgGraphBuilder);

/**
*
* Current UUID
*/
UUID watchfaceUUID();

}
Loading

0 comments on commit 66afd53

Please sign in to comment.