2015-08-21 00:58:18 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.model;
|
|
|
|
|
|
|
|
import android.support.annotation.Nullable;
|
|
|
|
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.devices.EventHandler;
|
2015-12-13 00:43:07 +01:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
2015-08-21 00:58:18 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.service.DeviceCommunicationService;
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public interface DeviceService extends EventHandler {
|
2015-11-23 22:46:12 +01:00
|
|
|
String PREFIX = "nodomain.freeyourgadget.gadgetbridge.devices";
|
2015-08-21 00:58:18 +02:00
|
|
|
|
2015-11-23 22:46:12 +01:00
|
|
|
String ACTION_START = PREFIX + ".action.start";
|
|
|
|
String ACTION_CONNECT = PREFIX + ".action.connect";
|
|
|
|
String ACTION_NOTIFICATION = PREFIX + ".action.notification";
|
|
|
|
String ACTION_CALLSTATE = PREFIX + ".action.callstate";
|
|
|
|
String ACTION_SETTIME = PREFIX + ".action.settime";
|
|
|
|
String ACTION_SETMUSICINFO = PREFIX + ".action.setmusicinfo";
|
|
|
|
String ACTION_REQUEST_DEVICEINFO = PREFIX + ".action.request_deviceinfo";
|
|
|
|
String ACTION_REQUEST_APPINFO = PREFIX + ".action.request_appinfo";
|
|
|
|
String ACTION_REQUEST_SCREENSHOT = PREFIX + ".action.request_screenshot";
|
|
|
|
String ACTION_STARTAPP = PREFIX + ".action.startapp";
|
|
|
|
String ACTION_DELETEAPP = PREFIX + ".action.deleteapp";
|
2016-03-03 14:23:17 +01:00
|
|
|
String ACTION_APP_CONFIGURE = PREFIX + ".action.app_configure";
|
2015-11-23 22:46:12 +01:00
|
|
|
String ACTION_INSTALL = PREFIX + ".action.install";
|
|
|
|
String ACTION_REBOOT = PREFIX + ".action.reboot";
|
2015-12-28 14:38:56 +01:00
|
|
|
String ACTION_HEARTRATE_TEST = PREFIX + ".action.heartrate_test";
|
2015-11-23 22:46:12 +01:00
|
|
|
String ACTION_FETCH_ACTIVITY_DATA = PREFIX + ".action.fetch_activity_data";
|
|
|
|
String ACTION_DISCONNECT = PREFIX + ".action.disconnect";
|
|
|
|
String ACTION_FIND_DEVICE = PREFIX + ".action.find_device";
|
|
|
|
String ACTION_SET_ALARMS = PREFIX + ".action.set_alarms";
|
|
|
|
String ACTION_ENABLE_REALTIME_STEPS = PREFIX + ".action.enable_realtime_steps";
|
|
|
|
String ACTION_REALTIME_STEPS = PREFIX + ".action.realtime_steps";
|
|
|
|
String EXTRA_DEVICE_ADDRESS = "device_address";
|
|
|
|
String EXTRA_NOTIFICATION_BODY = "notification_body";
|
2016-01-09 17:54:17 +01:00
|
|
|
String EXTRA_NOTIFICATION_FLAGS = "notification_flags";
|
2015-11-23 22:46:12 +01:00
|
|
|
String EXTRA_NOTIFICATION_ID = "notification_id";
|
|
|
|
String EXTRA_NOTIFICATION_PHONENUMBER = "notification_phonenumber";
|
|
|
|
String EXTRA_NOTIFICATION_SENDER = "notification_sender";
|
|
|
|
String EXTRA_NOTIFICATION_SOURCENAME = "notification_sourcename";
|
|
|
|
String EXTRA_NOTIFICATION_SUBJECT = "notification_subject";
|
|
|
|
String EXTRA_NOTIFICATION_TITLE = "notification_title";
|
|
|
|
String EXTRA_NOTIFICATION_TYPE = "notification_type";
|
|
|
|
String EXTRA_FIND_START = "find_start";
|
|
|
|
String EXTRA_CALL_COMMAND = "call_command";
|
|
|
|
String EXTRA_CALL_PHONENUMBER = "call_phonenumber";
|
|
|
|
String EXTRA_MUSIC_ARTIST = "music_artist";
|
|
|
|
String EXTRA_MUSIC_ALBUM = "music_album";
|
|
|
|
String EXTRA_MUSIC_TRACK = "music_track";
|
2016-03-27 17:44:20 +02:00
|
|
|
String EXTRA_MUSIC_DURATION = "music_duration";
|
|
|
|
String EXTRA_MUSIC_TRACKNR = "music_tracknr";
|
|
|
|
String EXTRA_MUSIC_TRACKCOUNT = "music_trackcount";
|
2015-11-23 22:46:12 +01:00
|
|
|
String EXTRA_APP_UUID = "app_uuid";
|
|
|
|
String EXTRA_APP_START = "app_start";
|
2016-03-03 16:04:17 +01:00
|
|
|
String EXTRA_APP_CONFIG = "app_config";
|
2015-11-23 22:46:12 +01:00
|
|
|
String EXTRA_URI = "uri";
|
|
|
|
String EXTRA_ALARMS = "alarms";
|
|
|
|
String EXTRA_PERFORM_PAIR = "perform_pair";
|
|
|
|
String EXTRA_ENABLE_REALTIME_STEPS = "enable_realtime_steps";
|
|
|
|
String EXTRA_REALTIME_STEPS = "realtime_steps";
|
|
|
|
String EXTRA_TIMESTAMP = "timestamp";
|
2015-08-21 00:58:18 +02:00
|
|
|
|
|
|
|
void start();
|
|
|
|
|
|
|
|
void connect();
|
2015-09-24 14:45:21 +02:00
|
|
|
|
2015-12-13 00:43:07 +01:00
|
|
|
void connect(GBDevice device);
|
|
|
|
|
2015-08-21 00:58:18 +02:00
|
|
|
void connect(@Nullable String deviceAddress);
|
2015-09-24 14:45:21 +02:00
|
|
|
|
2015-08-21 00:58:18 +02:00
|
|
|
void connect(@Nullable String deviceAddress, boolean performPair);
|
2015-09-24 14:45:21 +02:00
|
|
|
|
2015-08-21 00:58:18 +02:00
|
|
|
void disconnect();
|
|
|
|
|
|
|
|
void quit();
|
2015-09-24 14:45:21 +02:00
|
|
|
|
2015-08-21 00:58:18 +02:00
|
|
|
/**
|
|
|
|
* Requests information from the {@link DeviceCommunicationService} about the connection state,
|
|
|
|
* firmware info, etc.
|
|
|
|
* <p/>
|
|
|
|
* Note that this will not need a connection to the device -- only the cached information
|
|
|
|
* from the service will be reported.
|
|
|
|
*/
|
|
|
|
void requestDeviceInfo();
|
|
|
|
}
|