diff --git a/apps.json b/apps.json index a84a8010c6..9471579152 100644 --- a/apps.json +++ b/apps.json @@ -951,5 +951,19 @@ {"name":"chrono.app.js","url":"chrono.js"}, {"name":"chrono.img","url":"chrono-icon.js","evaluate":true} ] + }, + { + "id": "gbaudioc", + "name": "Gadgetbridge Audio Control", + "shortName": "gbAudioControl", + "icon": "gbaudioc.png", + "version": "0.01", + "description": "A gadgetbride remote control for your smartphones audio player", + "tags": "tool,gadgetbridge", + "type": "app", + "storage": [ + {"name":"gbaudioc.app.js","url":"gbcaudioc.js"}, + {"name":"gbaudioc.img","url":"gbcaudioc-icon.js","evaluate":true} + ] } ] diff --git a/apps/gbaudioc/ChangeLog b/apps/gbaudioc/ChangeLog new file mode 100644 index 0000000000..9ba6a29bdb --- /dev/null +++ b/apps/gbaudioc/ChangeLog @@ -0,0 +1 @@ +0.01: New App \ No newline at end of file diff --git a/apps/gbaudioc/gbaudioc.js b/apps/gbaudioc/gbaudioc.js new file mode 100644 index 0000000000..03a99f99d7 --- /dev/null +++ b/apps/gbaudioc/gbaudioc.js @@ -0,0 +1,37 @@ +function init() { + setWatch(btn1, BTN1); + setWatch(btn2, BTN2); + setWatch(btn3, BTN3); + Bangle.on('touch', function(b) { + b == 1 ? t1(): t2(); + }); + display(); +} + +function btn1() { + Bluetooth.println(JSON.stringify({t:"info", msg:"btn1"})) +} +function btn2() { + Bluetooth.println(JSON.stringify({t:"info", msg:"btn2"})) +} +function btn3() { + Bluetooth.println(JSON.stringify({t:"info", msg:"btn3"})) +} +function t1() { + Bluetooth.println(JSON.stringify({t:"info", msg:"t1"})) +} +function t2() { + Bluetooth.println(JSON.stringify({t:"info", msg:"t2"})) +} + +function display() { + g.clear(); + g.setFontAlign(0,0); // center font + g.setFont("Vector",30); + // draw the current counter value + g.drawString(gbAudicC, g.getWidth()/2, g.getHeight()/2); + // optional - this keeps the watch LCD lit up + g.flip(); +} + +init(); \ No newline at end of file diff --git a/apps/gbaudioc/gbaudioc.png b/apps/gbaudioc/gbaudioc.png new file mode 100644 index 0000000000..34b03d8129 Binary files /dev/null and b/apps/gbaudioc/gbaudioc.png differ diff --git a/apps/gbaudioc/gcaudioc-icon.js b/apps/gbaudioc/gcaudioc-icon.js new file mode 100644 index 0000000000..886f1990b7 --- /dev/null +++ b/apps/gbaudioc/gcaudioc-icon.js @@ -0,0 +1 @@ +require("heatshrink").decompress(atob("mEwwg52gczmcwCyoYUCYYbBFyIqEAooxPFqIWFDCsDDQTK2ABURAAwWOgIXHiAXoiUowUhC6USxAACDAIXC1QXMlAXDwQXE0AXLCwYABC4gwKgJGCkIDDC4gwJC4RDBJYQXEhQwJgMYxGBC4IECiArBFwIwJC5IrBCoIwJI5MKCoKpKO5R2BO5anJIgKnLa7BECIwQXRDAMowQWBI6IAGO6AXHU50RiczCgMzmIXBa5wTBCgIaBDYMQIYIXBJBIXJR4QuJC5p3ML44XDU6jXPC5IWJI5gALO5YX9L66PJC8cAC44WOAH4AEA")) \ No newline at end of file