mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
Fossil Hybrid HR: Request custom menu config on watchface initialization
This commit is contained in:
Binary file not shown.
@@ -1584,6 +1584,18 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter {
|
|||||||
);
|
);
|
||||||
queueWrite(new JsonPutRequest(responseObject, this));
|
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 {
|
} else {
|
||||||
LOG.warn("Unhandled request from watch: " + requestJson.toString());
|
LOG.warn("Unhandled request from watch: " + requestJson.toString());
|
||||||
}
|
}
|
||||||
|
2
external/fossil-hr-watchface
vendored
2
external/fossil-hr-watchface
vendored
Submodule external/fossil-hr-watchface updated: f07ed376e9...6a0c2bdad1
Reference in New Issue
Block a user