47 lines
1.4 KiB
Java
47 lines
1.4 KiB
Java
package nodomain.freeyourgadget.gadgetbridge.service.devices.pebble;
|
|
|
|
|
|
import android.util.Pair;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.UUID;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent;
|
|
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
|
import nodomain.freeyourgadget.gadgetbridge.entities.PebbleHealthActivitySample;
|
|
import nodomain.freeyourgadget.gadgetbridge.entities.User;
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
|
|
|
public class AppMessageHandler {
|
|
protected final PebbleProtocol mPebbleProtocol;
|
|
protected final UUID mUUID;
|
|
|
|
AppMessageHandler(UUID uuid, PebbleProtocol pebbleProtocol) {
|
|
mUUID = uuid;
|
|
mPebbleProtocol = pebbleProtocol;
|
|
}
|
|
|
|
public boolean isEnabled() {
|
|
return true;
|
|
}
|
|
|
|
public UUID getUUID() {
|
|
return mUUID;
|
|
}
|
|
|
|
public GBDeviceEvent[] handleMessage(ArrayList<Pair<Integer, Object>> pairs) {
|
|
return null;
|
|
}
|
|
|
|
public GBDeviceEvent[] pushMessage() {
|
|
return null;
|
|
}
|
|
|
|
protected PebbleHealthActivitySample createSample(int timestamp, int intensity, int steps, int type, User user, Device device) {
|
|
return new PebbleHealthActivitySample(null, timestamp, intensity, steps, type, user.getId(), device.getId());
|
|
}
|
|
|
|
protected GBDevice getDevice() {
|
|
return mPebbleProtocol.getDevice();
|
|
}
|
|
} |