From 6243d72ea020837d1468cce67585598b368fcbeb Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Mon, 17 Mar 2025 01:55:12 +0100 Subject: [PATCH 1/7] android: handle android STREAM_MUSIC volume level forwarding emit android STREAM_MUSIC volume when it arrives. --- apps/android/lib.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/android/lib.js b/apps/android/lib.js index c2b3722b3..39dba448b 100644 --- a/apps/android/lib.js +++ b/apps/android/lib.js @@ -44,6 +44,10 @@ exports.gbHandler = (event) => { "musicinfo" : function() { require("messages").pushMessage(Object.assign(event, {t:"modify",id:"music",title:"Music"})); }, + // {t:"audio", v:(percentage of max volume for android STREAM_MUSIC)} + "audio" : function() { + Bangle.emit("musicVolume", event.v); + }, // {"t":"call","cmd":"incoming/end/start/outgoing","name":"Bob","number":"12421312"}) "call" : function() { Object.assign(event, { @@ -386,4 +390,4 @@ exports.overwriteGPS = () => { // if the overwrite option is set, call this on i setTimeout(()=>{ if (!Bangle.isGPSOn()) require("android").gbSend({ t: "gps_power", status: false }); },3000); -}; \ No newline at end of file +}; From b1c914a2e6ae467930e1803f519e63aef27f05f9 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 17 Mar 2025 15:04:59 +0000 Subject: [PATCH 2/7] fix readme --- apps/setting/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/setting/README.md b/apps/setting/README.md index 00e46aa1f..bbc724083 100644 --- a/apps/setting/README.md +++ b/apps/setting/README.md @@ -18,7 +18,7 @@ See below for options under each heading: * **Clock** if you have more than one clock face, select the default one * **Launcher** if you have more than one app launcher, select the default one * **Date & Time** Configure the current time - Note that this can be done much more easily by choosing 'Set Time' from the App Loader -* **Altitude** On Bangle.js 2, adjust the altitude ( +* **Altitude** On Bangle.js 2, calibrate the altitude (which varies depending on Air Pressure). Tap `Adjust Up`/`Adjust Down` to move the reported altitude by around 10m ## Alerts From e01bbb3a67857190d1426153aee1de4cd3fec9ed Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Mon, 17 Mar 2025 19:22:54 +0100 Subject: [PATCH 3/7] android: bump version --- apps/android/ChangeLog | 5 ++++- apps/android/metadata.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/android/ChangeLog b/apps/android/ChangeLog index 9ac11d75b..6a5ae865a 100644 --- a/apps/android/ChangeLog +++ b/apps/android/ChangeLog @@ -41,4 +41,7 @@ 0.38: Don't rewrite settings file on every boot! 0.39: Move GB message handling into a library to reduce boot time from 40ms->13ms 0.40: Ensure we send health 'activity' message to gadgetbridge (added 2v26) -0.41: When using `actfetch`, fetch historical activity type too \ No newline at end of file +0.41: When using `actfetch`, fetch historical activity type too +0.42: Add handling for android STREAM_MUSIC volume level info, emitting on + arrival. + diff --git a/apps/android/metadata.json b/apps/android/metadata.json index 2066a2133..32a46d531 100644 --- a/apps/android/metadata.json +++ b/apps/android/metadata.json @@ -2,7 +2,7 @@ "id": "android", "name": "Android Integration", "shortName": "Android", - "version": "0.41", + "version": "0.42", "description": "Display notifications/music/etc sent from the Gadgetbridge app on Android. This replaces the old 'Gadgetbridge' Bangle.js widget.", "icon": "app.png", "tags": "tool,system,messages,notifications,gadgetbridge", From 95003511395797493917c717b171db6caf82434a Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Mon, 17 Mar 2025 20:13:39 +0100 Subject: [PATCH 4/7] android: add note about required Gadgetbridge version to ChangeLog --- apps/android/ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/android/ChangeLog b/apps/android/ChangeLog index 6a5ae865a..63645faf4 100644 --- a/apps/android/ChangeLog +++ b/apps/android/ChangeLog @@ -43,5 +43,6 @@ 0.40: Ensure we send health 'activity' message to gadgetbridge (added 2v26) 0.41: When using `actfetch`, fetch historical activity type too 0.42: Add handling for android STREAM_MUSIC volume level info, emitting on - arrival. + arrival. (Needs Gadgetbridge nightly (either flavor) for now, or stable + version 85 when it's out) From c94f97cf73b762d6b78da317fd2910c4acbe3cee Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Tue, 18 Mar 2025 10:39:04 +0000 Subject: [PATCH 5/7] updated for getting device info more reliably, fix https://github.com/espruino/BangleApps/issues/3771 --- core | 2 +- webtools | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core b/core index 3ec8e289a..25e82e98c 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 3ec8e289a26a545d0d0c50f6945978584fb3d7f8 +Subproject commit 25e82e98c8d0fd1dba38baf77d686c56bf037019 diff --git a/webtools b/webtools index d659cfa05..20fc8008d 160000 --- a/webtools +++ b/webtools @@ -1 +1 @@ -Subproject commit d659cfa05e66c5c770659668e8eecaecd08f91bd +Subproject commit 20fc8008dee232bcdcd3629ca5ffdef8401f7a8e From de41c422721b1c24964d1ddcceb6ab1886a19ca4 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 19 Mar 2025 14:15:39 +0000 Subject: [PATCH 6/7] Switch from Puck.js to UART.js which gives us the ability to send files to Bangle.js in the binary packet format -> big speed improvements --- core | 2 +- index.html | 8 ++++++-- loader.js | 8 ++++++-- webtools | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/core b/core index 25e82e98c..3b846e840 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 25e82e98c8d0fd1dba38baf77d686c56bf037019 +Subproject commit 3b846e840ea87cc70a76062b51324dd3e7441e6b diff --git a/index.html b/index.html index 608c90f91..aa92e55ab 100644 --- a/index.html +++ b/index.html @@ -209,11 +209,15 @@ - + + + - diff --git a/loader.js b/loader.js index 578b4e1c4..9aca4e3e9 100644 --- a/loader.js +++ b/loader.js @@ -267,12 +267,16 @@ window.addEventListener('load', (event) => { // BLE Compatibility var selectBLECompat = document.getElementById("settings-ble-compat"); if (selectBLECompat) { - Puck.increaseMTU = !SETTINGS.bleCompat; + function setBLECompat(compat) { + if ("undefined"!==typeof Puck) Puck.increaseMTU = !compat; + if ("undefined"!==typeof UART) UART.increaseMTU = !compat; + } + setBLECompat(SETTINGS.bleCompat); selectBLECompat.checked = !!SETTINGS.bleCompat; selectBLECompat.addEventListener("change",event=>{ console.log("BLE compatibility mode "+(event.target.checked?"on":"off")); SETTINGS.bleCompat = event.target.checked; - Puck.increaseMTU = !SETTINGS.bleCompat; + setBLECompat(SETTINGS.bleCompat); saveSettings(); }); } diff --git a/webtools b/webtools index 20fc8008d..83fd9f65a 160000 --- a/webtools +++ b/webtools @@ -1 +1 @@ -Subproject commit 20fc8008dee232bcdcd3629ca5ffdef8401f7a8e +Subproject commit 83fd9f65a378d0b4816552a5d84d2e1e8e71f538 From 1f2e693f7f3f89a7d1ade0ecb0c0f272d5087a18 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 19 Mar 2025 15:24:40 +0000 Subject: [PATCH 7/7] Update to new core+webtools --- core | 2 +- index.html | 2 +- webtools | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core b/core index 3b846e840..43dbadf5b 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 3b846e840ea87cc70a76062b51324dd3e7441e6b +Subproject commit 43dbadf5b9a41ff00aa6bef76d3360b510fb06a5 diff --git a/index.html b/index.html index aa92e55ab..8af9a6ec4 100644 --- a/index.html +++ b/index.html @@ -213,7 +213,7 @@ diff --git a/webtools b/webtools index 83fd9f65a..27939deca 160000 --- a/webtools +++ b/webtools @@ -1 +1 @@ -Subproject commit 83fd9f65a378d0b4816552a5d84d2e1e8e71f538 +Subproject commit 27939deca30abe8896a4e630e732e5cf4f9a3712