mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 17:02:13 +01:00
Fossil Hybrid HR: Request custom menu config on watchface initialization
This commit is contained in:
parent
7f026edbd0
commit
820bcf258d
Binary file not shown.
@ -1584,6 +1584,18 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter {
|
||||
);
|
||||
queueWrite(new JsonPutRequest(responseObject, this));
|
||||
}
|
||||
} else if (request.optString("custom_menu").equals("request_config")) {
|
||||
// watchface requests custom menu data to be initialized
|
||||
LOG.info("Got custom_menu config request, sending intent to HR Menu Companion app...");
|
||||
Intent intent = new Intent();
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.setClassName("d.d.hrmenucompanion", "d.d.hrmenucompanion.MainActivity");
|
||||
intent.putExtra("SEND_CONFIG", true);
|
||||
try {
|
||||
getContext().startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
LOG.info("Couldn't send intent to Fossil-HR-Menu-Companion app, is it installed?");
|
||||
}
|
||||
} else {
|
||||
LOG.warn("Unhandled request from watch: " + requestJson.toString());
|
||||
}
|
||||
|
2
external/fossil-hr-watchface
vendored
2
external/fossil-hr-watchface
vendored
@ -1 +1 @@
|
||||
Subproject commit f07ed376e9046dbcc9c5d7821117c80b2d79ffd1
|
||||
Subproject commit 6a0c2bdad14e58d4cf4359e5f573c60aa89bca53
|
Loading…
Reference in New Issue
Block a user