Skip to content

Commit 6243d72

Browse files
author
thyttan
committed
android: handle android STREAM_MUSIC volume level forwarding
emit android STREAM_MUSIC volume when it arrives.
1 parent f7c1b1b commit 6243d72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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+
};

0 commit comments

Comments
 (0)