From 820bcf258d402f73cbd7696efb9a64e2603c1bf6 Mon Sep 17 00:00:00 2001 From: Arjan Schrijver Date: Wed, 15 Jun 2022 11:59:33 +0200 Subject: [PATCH] Fossil Hybrid HR: Request custom menu config on watchface initialization --- .../assets/fossil_hr/openSourceWatchface.bin | Bin 7956 -> 8070 bytes .../fossil_hr/FossilHRWatchAdapter.java | 12 ++++++++++++ external/fossil-hr-watchface | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/src/main/assets/fossil_hr/openSourceWatchface.bin b/app/src/main/assets/fossil_hr/openSourceWatchface.bin index 6358d3cdfc98afdc90e8f9f699004c3892abd04e..7ab1121c83fa99c64ec3f0d7c0da6c3319d37000 100644 GIT binary patch delta 2206 zcmZ{mTWl3&5XXPJ=koQmrL+Z#Hm1TUuq}mJi|whklxw@oMbUzVR&M3CAX1(HYexIH}n1fGxML> zW9^6MO?XKwK&c6i342Vqnt;+2Y)`?rDcD#5Eg3kIfu9RuO%b#dLqi!n zUPd9;%b=kgM*I$AXK%}N=iwPntK~dWUv$HhUF-A2V(@UAAnNHuN(*!}YZ<^IZIj~wl0iJxf!XMRtQe)&2 zwMnxzRm1mQO?vi7vXhjK1V%FH<+M+jKTpo6H52iD`3)D*RR)Sj!?kWgZf%PO<1)#dY z>xQTs?9~vi25Sv49^5q$$Rp=^!0Umi2drLjdm-w@pOgGyQWLmOL9kY;0MS~o*7@bB zx+bx#hh~h9!Z_Or!!R-#xhz-@Y9rWv;PrvM3A{~UZ}taLjrHDUu(m+71=KchT?n^> zyF>B`>S^$HLih}*e*eeRfpT#P`Za8|8|>Zw`gGM$9BB{K875adbr&ULFiF5Pf zJ5JTFJ4GS}gMNKMRkyoeUt&EA!E<0g58eT=4uX3S!h_(w0PZ23_~_7>VrJc{rPR+F z(%ldaN%Q$<3l3-P7j5 z6$Gzo>52HI{j3y(uS4(#Sc(`x_@;CR1V_NC_HSfC&NEcbfiMW7{int z9f#;RxF`J9;_uQD+}h&*UEJ6lo`C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gFg*a%E0lbQ-fDvF#5B> zn*&i5cn^d95HViAesXBW`Gh3^qcL4o)>0f}J_pe`-CtIj3BCb2QpIMhgY)18Mr~2A z9xppo9R#2zz?pz>!Yr)$fVu#V{Cjn6`I5W4(Z2xUMTowI;5+axJ-GX1&&ht1YfW}w zXc+|dK?pB__q{1LlIL_&k8}B6ebHr8Z%j}{EKdDv`9E9C+Or^8TpUlq26JuZdn{*i z)ymZ>b0$}CYx2kDf*YwU%bKlbRhKAiOW#Ph7B#1@c2CZmRg;{|RgNSkZ_PQS{sm_% Br+WYZ diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java index f997d40f6..f2b76a007 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java @@ -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()); } diff --git a/external/fossil-hr-watchface b/external/fossil-hr-watchface index f07ed376e..6a0c2bdad 160000 --- a/external/fossil-hr-watchface +++ b/external/fossil-hr-watchface @@ -1 +1 @@ -Subproject commit f07ed376e9046dbcc9c5d7821117c80b2d79ffd1 +Subproject commit 6a0c2bdad14e58d4cf4359e5f573c60aa89bca53