Skip to content

Commit 130b487

Browse files
authored
Merge pull request #3776 from thyttan/phonevolume
android: handle android STREAM_MUSIC volume level forwarding
2 parents b1c914a + 9500351 commit 130b487

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

apps/android/ChangeLog

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,8 @@
4141
0.38: Don't rewrite settings file on every boot!
4242
0.39: Move GB message handling into a library to reduce boot time from 40ms->13ms
4343
0.40: Ensure we send health 'activity' message to gadgetbridge (added 2v26)
44-
0.41: When using `actfetch`, fetch historical activity type too
44+
0.41: When using `actfetch`, fetch historical activity type too
45+
0.42: Add handling for android STREAM_MUSIC volume level info, emitting on
46+
arrival. (Needs Gadgetbridge nightly (either flavor) for now, or stable
47+
version 85 when it's out)
48+

apps/android/lib.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ exports.gbHandler = (event) => {
4444
"musicinfo" : function() {
4545
require("messages").pushMessage(Object.assign(event, {t:"modify",id:"music",title:"Music"}));
4646
},
47+
// {t:"audio", v:(percentage of max volume for android STREAM_MUSIC)}
48+
"audio" : function() {
49+
Bangle.emit("musicVolume", event.v);
50+
},
4751
// {"t":"call","cmd":"incoming/end/start/outgoing","name":"Bob","number":"12421312"})
4852
"call" : function() {
4953
Object.assign(event, {
@@ -386,4 +390,4 @@ exports.overwriteGPS = () => { // if the overwrite option is set, call this on i
386390
setTimeout(()=>{
387391
if (!Bangle.isGPSOn()) require("android").gbSend({ t: "gps_power", status: false });
388392
},3000);
389-
};
393+
};

apps/android/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "android",
33
"name": "Android Integration",
44
"shortName": "Android",
5-
"version": "0.41",
5+
"version": "0.42",
66
"description": "Display notifications/music/etc sent from the Gadgetbridge app on Android. This replaces the old 'Gadgetbridge' Bangle.js widget.",
77
"icon": "app.png",
88
"tags": "tool,system,messages,notifications,gadgetbridge",

0 commit comments

Comments
 (0)