mirror of https://github.com/espruino/BangleApps
iOS app 0.08
============ Added more details from music (instead of Undefined) Added more app identifiers Added Readme Messages app 0.13 ================= New animated widget bell icon (instead of large blinking 'MESSAGES') New app icon Added screenshot Extra app-specific notification icons Locale 0.14 =========== Added some first translations for Messages in nl_NLpull/1084/head
parent
9e166ec7a6
commit
96078a2791
|
@ -92,6 +92,7 @@
|
||||||
{"name":"messages","url":"lib.js"}
|
{"name":"messages","url":"lib.js"}
|
||||||
],
|
],
|
||||||
"data": [{"name":"messages.json"},{"name":"messages.settings.json"}],
|
"data": [{"name":"messages.json"},{"name":"messages.settings.json"}],
|
||||||
|
"screenshots": [{"url":"screenshot.jpg"},{"url":"screen-notification.gif"}],
|
||||||
"sortorder": -9
|
"sortorder": -9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -217,7 +218,7 @@
|
||||||
{
|
{
|
||||||
"id": "locale",
|
"id": "locale",
|
||||||
"name": "Languages",
|
"name": "Languages",
|
||||||
"version": "0.13",
|
"version": "0.14",
|
||||||
"description": "Translations for different countries",
|
"description": "Translations for different countries",
|
||||||
"icon": "locale.png",
|
"icon": "locale.png",
|
||||||
"type": "locale",
|
"type": "locale",
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
# iOS integration app
|
||||||
|
|
||||||
|
This is the iOS integration app for Bangle.js. This app allows you to receive
|
||||||
|
notifications from your iPhone. The Apple Notification Center Service (ANCS)
|
||||||
|
sends all the messages to your watch.
|
||||||
|
|
||||||
|
You can allow this if you connect your Bangle to your iPhone. It will be
|
||||||
|
prompted for immediatly after you connect the Bangle to the iPhone.
|
||||||
|
|
||||||
|
### Connecting your Bangle(2).js to your iPhone
|
||||||
|
The Bangle watches are Bluetooth Low Energy (BLE) devices. Sometimes they
|
||||||
|
will not be seen/detected by the Bluetooth scanner in your iPhone settings
|
||||||
|
menu.
|
||||||
|
|
||||||
|
To resolve this, you can download numerous apps who can actually scan
|
||||||
|
for BLE devices. There are great ones out there, free and paid.
|
||||||
|
|
||||||
|
We really like WebBLE, which we also recommend to load apps on your
|
||||||
|
watch with your iOS device, as Safari does not support WebBluetooth
|
||||||
|
for now. It's just a few bucks/pounds/euro's.
|
||||||
|
|
||||||
|
If you like to try a free app first, you can always use NRF Toolbox or
|
||||||
|
Bluetooth BLE Device Finder to find and connect your Bangle.
|
||||||
|
|
||||||
|
## Requests
|
||||||
|
|
||||||
|
Please file any issues on https://github.com/espruino/BangleApps/issues/new?title=ios%20app
|
||||||
|
|
||||||
|
## Creator
|
||||||
|
|
||||||
|
Gordon Williams
|
|
@ -125,13 +125,19 @@ E.on('notify',msg=>{
|
||||||
|
|
||||||
// Apple media service
|
// Apple media service
|
||||||
E.on('AMS',a=>{
|
E.on('AMS',a=>{
|
||||||
|
function format_song_time(song_seconds) {
|
||||||
|
var minutes = (new Array(3).join("0")+(Math.floor(song_seconds / 60))).slice(-2);
|
||||||
|
var seconds = (new Array(3).join("0")+(parseInt(song_seconds) - minutes * 60)).slice(-2);
|
||||||
|
return minutes + ":" + seconds;
|
||||||
|
}
|
||||||
|
|
||||||
function push(m) {
|
function push(m) {
|
||||||
var msg = { t : "modify", id : "music", title:"Music" };
|
var msg = { t : "modify", id : "music", title:"Music" };
|
||||||
if (a.id=="artist") msg.artist = m;
|
if (a.id=="artist") msg.artist = m;
|
||||||
else if (a.id=="album") msg.album = m;
|
else if (a.id=="album") msg.album = m;
|
||||||
else if (a.id=="title") msg.track = m;
|
else if (a.id=="title") msg.track = m;
|
||||||
else if (a.id=="duration") msg.track = m;
|
else if (a.id=="duration") msg.duration = format_song_time(m);
|
||||||
else return; // duration? need to reformat
|
else return;
|
||||||
require("messages").pushMessage(msg);
|
require("messages").pushMessage(msg);
|
||||||
}
|
}
|
||||||
if (a.truncated) NRF.amsGetMusicInfo(a.id).then(push)
|
if (a.truncated) NRF.amsGetMusicInfo(a.id).then(push)
|
||||||
|
|
|
@ -13,3 +13,4 @@
|
||||||
0.11: Added translations for nl_NL and changes one formatting
|
0.11: Added translations for nl_NL and changes one formatting
|
||||||
0.12: Fixed nl_NL formatting, because the full months won't fit on the Bangle.js2's screen
|
0.12: Fixed nl_NL formatting, because the full months won't fit on the Bangle.js2's screen
|
||||||
0.13: Now use shorter de_DE date format to more closely match other languages for size
|
0.13: Now use shorter de_DE date format to more closely match other languages for size
|
||||||
|
0.14: Added some first translations for Messages in nl_NL
|
||||||
|
|
|
@ -198,7 +198,8 @@ var locales = {
|
||||||
day: "zondag,maandag,dinsdag,woensdag,donderdag,vrijdag,zaterdag",
|
day: "zondag,maandag,dinsdag,woensdag,donderdag,vrijdag,zaterdag",
|
||||||
abmonth: "jan,feb,mrt,apr,mei,jun,jul,aug,sep,okt,nov,dec",
|
abmonth: "jan,feb,mrt,apr,mei,jun,jul,aug,sep,okt,nov,dec",
|
||||||
month: "januari,februari,maart,april,mei,juni,juli,augustus,september,oktober,november,december",
|
month: "januari,februari,maart,april,mei,juni,juli,augustus,september,oktober,november,december",
|
||||||
trans: { yes: "ja", Yes: "Ja", no: "nee", No: "Nee", ok: "ok", on: "aan", off: "uit", "< Back": "< Terug" }
|
trans: { yes: "ja", Yes: "Ja", no: "nee", No: "Nee", ok: "ok", on: "aan", off: "uit",
|
||||||
|
"< Back": "< Terug", "Delete": "Verwijderen", "Mark Unread": "Markeer als ongelezen" }
|
||||||
},
|
},
|
||||||
"en_NL": { // English date units with Dutch number, currency and navigation units.
|
"en_NL": { // English date units with Dutch number, currency and navigation units.
|
||||||
lang: "en_NL",
|
lang: "en_NL",
|
||||||
|
|
|
@ -17,6 +17,16 @@ and `Messages`:
|
||||||
If there is no user input for this amount of time then the app will exit and return
|
If there is no user input for this amount of time then the app will exit and return
|
||||||
to the clock where a ringing bell will be shown in the Widget bar.
|
to the clock where a ringing bell will be shown in the Widget bar.
|
||||||
|
|
||||||
|
## Images
|
||||||
|
_1. Screenshot of a notification_
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
_2. What the notify icon looks like (it's touchable on Bangle.js2!)_
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Requests
|
## Requests
|
||||||
|
|
||||||
|
@ -25,3 +35,11 @@ Please file any issues on https://github.com/espruino/BangleApps/issues/new?titl
|
||||||
## Creator
|
## Creator
|
||||||
|
|
||||||
Gordon Williams
|
Gordon Williams
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
[Jeroen Peters](https://github.com/jeroenpeters1986)
|
||||||
|
|
||||||
|
## Attributions
|
||||||
|
|
||||||
|
Icons used in this app are from https://icons8.com
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
require("heatshrink").decompress(atob("mEwxH+ABV7ACQfLABobBwOCACGBGLAYBwWIACWCGC4uHEAQJBRIYPIF7wACAggvfRqYADF6qBDAC7uWACGmAAIFCF6+tAB+zAAQFCF84uGF7ghDFw+s1iNDAoIva2fX64wH2a3CfjYvDFwQwHQwWCxIASIoJfOXZAvKSoIvWX47qDF5CYEBhIvMLpA3BEQ4hB0vP5+lBpIvRFwgvIFwYwDF7AuFR5F71YvD1YvYFwwvHEAIvE54OIF5wuDF4LvJXwQACF7AtE64FDEBAADMYIvVLgvXAAIvIdwrwIF5q7GFwYvGD4IuFSA4vMdQ4HED4t7wIvHwJgEF5YuMF44AKF5wuNd5AACDYIFDX54uNF45kFBRAvMFxYvLABQvLEwXX65lIF8AmDFxIviRhQACcoQADGoYKGAArvLFxQAB1mm02CFIIvDFqIvIFxINFF4aDIABYvDJwIgBwOsEoKaC1mBBwovCRoQvZcwOmF4mmBwusF4IuVF4wDBL5OtF4TpFF6y7PAAQyBGYIvXFyQAEF7AuVF7AAZF6qrCACgvXxAAWF6owBEJJSCwQvKFygvBERIvMBgIv/eBC9TdywwEGIIAQCgQuWGIoAQEiA"))
|
require("heatshrink").decompress(atob("mEw4cA///ueLn/Hz/nr+G3Wtiv/v/fHc8CpMkyQCCpARJydt23bAQVJCBEEBwYCCtMgCJWkzVJmwFBCJEGEY1tkg1PCJRoDAQg1I0gPE2/S0gRNpu+y4RKNIIRBtRHKg2lTgMkyY6FAQNACIeuTgMkzc2CAtKCImkzYKB7YRD7IRI3VJk3fCIWkydkCI4uBm36CIMlndstgRJRgIRBkM7ttMCJCMCCIW7CJVt+m7CImMCI+Tt/3NYUhkmdCJGbv75BCIMpWoONCI/b9M2PoUNCIOpCI2m79L2x9CpwRB2OyCIoOBrp9DYwYRFgs36Xt32TUIW0zahGgs+y59BdIjXHgt0zdv0rpEfY8FfAN9lwRMg2uPoXbk3bIgNbtu26QRE+x9C7dUyVMyAkDCAQ1Bmx9BCINt+oRBwAODCIc7qWt6n9t2lpmECJU9zXpvnVpskCAwRBvd/lva6Po6hEBCJElIgO276yBtQRIdIIRC/RmCCJOkOoWtNoQRIgiGDAQgjIGgQCECL3SCJkECI8gCJYCDtIRIgGTCItJCBEAgR9FpARJAD4A="))
|
|
@ -21,6 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Layout = require("Layout");
|
var Layout = require("Layout");
|
||||||
|
var locale = require("locale");
|
||||||
var fontSmall = "6x8";
|
var fontSmall = "6x8";
|
||||||
var fontMedium = g.getFonts().includes("6x15")?"6x15":"6x8:2";
|
var fontMedium = g.getFonts().includes("6x15")?"6x15":"6x8:2";
|
||||||
var fontBig = g.getFonts().includes("12x20")?"12x20":"6x8:2";
|
var fontBig = g.getFonts().includes("12x20")?"12x20":"6x8:2";
|
||||||
|
@ -66,7 +67,7 @@ function getBackImage() {
|
||||||
return atob("FhYBAAAAEAAAwAAHAAA//wH//wf//g///BwB+DAB4EAHwAAPAAA8AADwAAPAAB4AAHgAB+AH/wA/+AD/wAH8AA==");
|
return atob("FhYBAAAAEAAAwAAHAAA//wH//wf//g///BwB+DAB4EAHwAAPAAA8AADwAAPAAB4AAHgAB+AH/wA/+AD/wAH8AA==");
|
||||||
}
|
}
|
||||||
function getNotificationImage() {
|
function getNotificationImage() {
|
||||||
return atob("GBiBAf////wA//AAf/AAf/AAf/f/f/f/f/fgA/fv/ffvPffuPffuPffuHffv/ffmA/f4f/fxf/f/f/f/f/AAf/Bwf/AAf/wA/////w==");
|
return atob("FBSBAH//7//////////////////////////////////////////////3//4PgADgAA4AAAAA");
|
||||||
}
|
}
|
||||||
function getFBIcon() {
|
function getFBIcon() {
|
||||||
return atob("GBiBAAAAAAAAAAAYAAD/AAP/wAf/4A/48A/g8B/g+B/j+B/n+D/n/D8A/B8A+B+B+B/n+A/n8A/n8Afn4APnwADnAAAAAAAAAAAAAA==");
|
return atob("GBiBAAAAAAAAAAAYAAD/AAP/wAf/4A/48A/g8B/g+B/j+B/n+D/n/D8A/B8A+B+B+B/n+A/n8A/n8Afn4APnwADnAAAAAAAAAAAAAA==");
|
||||||
|
@ -99,7 +100,7 @@ function getMessageImage(msg) {
|
||||||
if (s=="twitter") return atob("GhYBAABgAAB+JgA/8cAf/ngH/5+B/8P8f+D///h///4f//+D///g///wD//8B//+AP//gD//wAP/8AB/+AB/+AH//AAf/AAAYAAA");
|
if (s=="twitter") return atob("GhYBAABgAAB+JgA/8cAf/ngH/5+B/8P8f+D///h///4f//+D///g///wD//8B//+AP//gD//wAP/8AB/+AB/+AH//AAf/AAAYAAA");
|
||||||
if (s=="telegram") return atob("GBiBAAAAAAAAAAAAAAAAAwAAHwAA/wAD/wAf3gD/Pgf+fh/4/v/z/P/H/D8P/Acf/AM//AF/+AF/+AH/+ADz+ADh+ADAcAAAMAAAAA==");
|
if (s=="telegram") return atob("GBiBAAAAAAAAAAAAAAAAAwAAHwAA/wAD/wAf3gD/Pgf+fh/4/v/z/P/H/D8P/Acf/AM//AF/+AF/+AH/+ADz+ADh+ADAcAAAMAAAAA==");
|
||||||
if (s=="whatsapp") return atob("GBiBAAB+AAP/wAf/4A//8B//+D///H9//n5//nw//vw///x///5///4///8e//+EP3/APn/wPn/+/j///H//+H//8H//4H//wMB+AA==");
|
if (s=="whatsapp") return atob("GBiBAAB+AAP/wAf/4A//8B//+D///H9//n5//nw//vw///x///5///4///8e//+EP3/APn/wPn/+/j///H//+H//8H//4H//wMB+AA==");
|
||||||
if (s=="wordfeud") return atob("GBgBP//8f//+////////////+/5X+/73+/7/+/7/+f7/+c7//Y7//a7//az//bX//XX//XX//Hn//nn//vn/////////f//+AB6A");
|
if (s=="wordfeud") return atob("GBgCWqqqqqqlf//////9v//////+v/////++v/////++v8///Lu+v8///L++v8///P/+v8v//P/+v9v//P/+v+fx/P/+v+Pk+P/+v/PN+f/+v/POuv/+v/Ofdv/+v/NvM//+v/I/Y//+v/k/k//+v/i/w//+v/7/6//+v//////+v//////+f//////9Wqqqqqql");
|
||||||
if (msg.id=="music") return atob("FhaBAH//+/////////////h/+AH/4Af/gB/+H3/7/f/v9/+/3/7+f/vB/w8H+Dwf4PD/x/////////////3//+A=");
|
if (msg.id=="music") return atob("FhaBAH//+/////////////h/+AH/4Af/gB/+H3/7/f/v9/+/3/7+f/vB/w8H+Dwf4PD/x/////////////3//+A=");
|
||||||
if (msg.id=="back") return getBackImage();
|
if (msg.id=="back") return getBackImage();
|
||||||
return getNotificationImage();
|
return getNotificationImage();
|
||||||
|
@ -177,14 +178,17 @@ function showMusicMessage(msg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMessageSettings(msg) {
|
function showMessageSettings(msg) {
|
||||||
|
var delete_txt = locale.translate("Delete");
|
||||||
|
var unread_txt = locale.translate("Mark Unread");
|
||||||
|
var back_txt = locale.translate("< Back");
|
||||||
E.showMenu({"":{"title":"Message"},
|
E.showMenu({"":{"title":"Message"},
|
||||||
"< Back" : () => showMessage(msg.id),
|
back_txt : () => showMessage(msg.id),
|
||||||
"Delete" : () => {
|
delete_txt : () => {
|
||||||
MESSAGES = MESSAGES.filter(m=>m.id!=msg.id);
|
MESSAGES = MESSAGES.filter(m=>m.id!=msg.id);
|
||||||
saveMessages();
|
saveMessages();
|
||||||
checkMessages({clockIfNoMsg:0,clockIfAllRead:0,showMsgIfUnread:0});
|
checkMessages({clockIfNoMsg:0,clockIfAllRead:0,showMsgIfUnread:0});
|
||||||
},
|
},
|
||||||
"Mark Unread" : () => {
|
unread_txt : () => {
|
||||||
msg.new = true;
|
msg.new = true;
|
||||||
saveMessages();
|
saveMessages();
|
||||||
checkMessages({clockIfNoMsg:0,clockIfAllRead:0,showMsgIfUnread:0});
|
checkMessages({clockIfNoMsg:0,clockIfAllRead:0,showMsgIfUnread:0});
|
||||||
|
@ -242,7 +246,7 @@ function showMessage(msgid) {
|
||||||
var body = (lines.length>4) ? lines.slice(0,4).join("\n")+"..." : lines.join("\n");
|
var body = (lines.length>4) ? lines.slice(0,4).join("\n")+"..." : lines.join("\n");
|
||||||
layout = new Layout({ type:"v", c: [
|
layout = new Layout({ type:"v", c: [
|
||||||
{type:"h", fillx:1, bgCol:colBg, c: [
|
{type:"h", fillx:1, bgCol:colBg, c: [
|
||||||
{ type:"btn", src:getMessageImage(msg), cb:()=>{
|
{ type:"btn", src:getMessageImage(msg), pad: 3, cb:()=>{
|
||||||
cancelReloadTimeout(); // don't auto-reload to clock now
|
cancelReloadTimeout(); // don't auto-reload to clock now
|
||||||
showMessageSettings(msg);
|
showMessageSettings(msg);
|
||||||
}},
|
}},
|
||||||
|
@ -271,7 +275,7 @@ function checkMessages(options) {
|
||||||
if (!MESSAGES.length) {
|
if (!MESSAGES.length) {
|
||||||
if (!options.clockIfNoMsg) return E.showPrompt("No Messages",{
|
if (!options.clockIfNoMsg) return E.showPrompt("No Messages",{
|
||||||
title:"Messages",
|
title:"Messages",
|
||||||
img:require("heatshrink").decompress(atob("kkk4UBrkc/4AC/tEqtACQkBqtUDg0VqAIGgoZFDYQIIM1sD1QAD4AIBhnqA4WrmAIBhc6BAWs8AIBhXOBAWz0AIC2YIC5wID1gkB1c6BAYFBEQPqBAYXBEQOqBAnDAIQaEnkAngaEEAPDFgo+IKA5iIOhCGIAFb7RqAIGgtUBA0VqobFgNVA")),
|
img:require("heatshrink").decompress(atob("k0swQEB1QAC1AND1f/AAWgBAUrBAf+wAIBgW//2uCoP4CQUvCQYcDCQIID/QSClQ4D1QSDDYn+EpHgCQ4lDCQfqFAeiBAX7FAgSDIoniCQn61QSH3/vCQ3rBQISF/wMCCQoaBCQ+qCQ+vAIISFBQInBCQpDB94SFKgJVBCQv+YAJeG/RxHQiAZCAgSqE1Y5CwS9E3+AaA379DQD/fv9++3TQEQQP79T2IcY4ABCRkqeQeqErBwCCQcrAwLEB/5nCgSKEM4UAhQJDDYYJBIIYbCgA")),
|
||||||
buttons : {"Ok":1}
|
buttons : {"Ok":1}
|
||||||
}).then(() => { load() });
|
}).then(() => { load() });
|
||||||
return load();
|
return load();
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
|
@ -9,7 +9,8 @@ WIDGETS["messages"]={area:"tl",width:0,draw:function() {
|
||||||
*/
|
*/
|
||||||
var c = parseInt(Date.now()/1000);
|
var c = parseInt(Date.now()/1000);
|
||||||
g.reset().clearRect(this.x,this.y,this.x+this.width,this.y+23);
|
g.reset().clearRect(this.x,this.y,this.x+this.width,this.y+23);
|
||||||
g.drawImage((c&1) ? atob("FBSBAAGAABwAA/gAf8AP/AD/wA/8AP/gD/8Af/AP/4D//A//4f//H//x//w//gP8gAA4AAOA") : atob("FBSBAAAYAAOAAfwAP+AD/wA/8AP/AH/wD/8A/+Af/wP/8H//D//4//+D//gH/8AT/AHAABwA"), this.x, this.y);
|
//g.drawImage((c&1) ? atob("FBSBAAGAABwAA/gAf8AP/AD/wA/8AP/gD/8Af/AP/4D//A//4f//H//x//w//gP8gAA4AAOA") : atob("FBSBAAAYAAOAAfwAP+AD/wA/8AP/AH/wD/8A/+Af/wP/8H//D//4//+D//gH/8AT/AHAABwA"), this.x, this.y);
|
||||||
|
g.drawImage((c&1) ? atob("HBgBAAAAAAAAAAAAAAAAAAAABgAAAPAAAB+AAAH4AAAfgAAD/AAAP8AAA/wAAH/gAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") : atob("HBiBAcAAADgAAAGAAAAQAGAAAAYAAADwAAAfgAAD/AAAP8AAA/wAAD/AAAf+AAB/4AAAAAAAAAAAAGAAgAAAGAAAAYAAAB8AAA/4P///j///+f///7///w=="), this.x, this.y);
|
||||||
|
|
||||||
|
|
||||||
//if (c<60) Bangle.setLCDPower(1); // keep LCD on for 1 minute
|
//if (c<60) Bangle.setLCDPower(1); // keep LCD on for 1 minute
|
||||||
|
|
Loading…
Reference in New Issue