mirror of https://github.com/espruino/BangleApps
messagesmusic added.
parent
dc273a7a12
commit
3b67746ccd
|
@ -0,0 +1 @@
|
||||||
|
0.01: New App!
|
|
@ -0,0 +1,15 @@
|
||||||
|
Hacky app that uses Messages app and it's library to push a message that triggers the music controls. It's nearly not an app, and yet it moves.
|
||||||
|
|
||||||
|
This app require Messages setting 'Auto-open Music' to be 'Yes'. If it isn't, the app will change it to 'Yes' and let it stay that way.
|
||||||
|
|
||||||
|
Making the music controls accessible this way lets one start a music stream on the phone in some situations even though the message app didn't receive a music message from gadgetbridge to begin with. (I think.)
|
||||||
|
|
||||||
|
It is suggested to use Messages Music along side the app Quick Launch.
|
||||||
|
|
||||||
|
Messages Music v0.01 has been verified to work with Messages v0.31 on Bangle.js 2 fw2v13.
|
||||||
|
|
||||||
|
Music Messages should work with forks of the original Messages app. At least as long as functions pushMessage() in the library and showMusicMessage() in app.js hasn't been changed too much.
|
||||||
|
|
||||||
|
Messages app is created by Gordon Williams with contributions from [Jeroen Peters](https://github.com/jeroenpeters1986).
|
||||||
|
|
||||||
|
The icon used for this app is from [https://icons8.com](https://icons8.com).
|
|
@ -0,0 +1 @@
|
||||||
|
require("heatshrink").decompress(atob("mEwwhC/AFXdAAQVVDKQWHDB0NC5PQCyoYMCxZJKFxgwKCxowJC6xGOJBALE6YwRBQnf+YXPIwvf/4YKJAgXHDBQXNDBIXO/89C5YKFC4gYIC54YHC6AYGC6IYFC9JHWO6ynLa64XJ+YWGC5wWIC5oWJC4p4F74WKOwgXG6YWKC4xIFABRGFYI4uPC7JIOIw4wPCxAwNFxIYMCxZJLCxgYJCxwZGCqIA/AC4="))
|
|
@ -0,0 +1,15 @@
|
||||||
|
let showMusic = () => {
|
||||||
|
Bangle.CLOCK = 1; // To pass condition in messages library
|
||||||
|
require('messages').pushMessage({"t":"add","artist":" ","album":" ","track":" ","dur":0,"c":-1,"n":-1,"id":"music","title":"Music","state":"play","new":true});
|
||||||
|
Bangle.CLOCK = undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
var settings = require('Storage').readJSON('messages.settings.json', true) || {}; //read settings if they exist else set to empty dict
|
||||||
|
if (!settings.openMusic) {
|
||||||
|
settings.openMusic = true; // This app/hack works as intended only if this setting is true
|
||||||
|
require('Storage').writeJSON('messages.settings.json', settings);
|
||||||
|
E.showMessage("First run:\n\nMessages setting\n\n 'Auto-Open Music'\n\n set to 'Yes'");
|
||||||
|
setTimeout(()=>{showMusic();}, 5000);
|
||||||
|
} else {
|
||||||
|
showMusic();
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
let showMusic = () => {
|
||||||
|
Bangle.CLOCK = 1; // To pass condition in messages library
|
||||||
|
require('messages').pushMessage({"t":"add","artist":" ","album":" ","track":" ","dur":0,"c":-1,"n":-1,"id":"music","title":"Music","state":"play","new":true});
|
||||||
|
Bangle.CLOCK = undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
var settings = require('Storage').readJSON('messages.settings.json', true) || {}; //read settings if they exist else set to empty dict
|
||||||
|
if (!settings.openMusic) {
|
||||||
|
settings.openMusic = true; // This app/hack works as intended only if this setting is true
|
||||||
|
require('Storage').writeJSON('messages.settings.json', settings);
|
||||||
|
E.showMessage("First run:\n\nMessages setting\n\n 'Auto-Open Music'\n\n set to 'Yes'");
|
||||||
|
setTimeout(()=>{showMusic();}, 5000);
|
||||||
|
} else {
|
||||||
|
showMusic();
|
||||||
|
};
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"id": "messagesmusic",
|
||||||
|
"name":"Messages Music",
|
||||||
|
"version":"0.01",
|
||||||
|
"description": "Uses Messages library to push a music message which in turn displays Messages app music controls",
|
||||||
|
"icon":"app.png",
|
||||||
|
"type": "app",
|
||||||
|
"tags":"tool,music",
|
||||||
|
"screenshots": [{"url":"screenshot.png"}],
|
||||||
|
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||||
|
"readme": "README.md",
|
||||||
|
"storage": [
|
||||||
|
{"name":"messagesmusic.app.js","url":"app.js"},
|
||||||
|
{"name":"messagesmusic.img","url":"app-icon.js","evaluate":true}
|
||||||
|
],
|
||||||
|
"dependencies": {"messages":"app"}
|
||||||
|
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Loading…
Reference in New Issue