Merge branch 'master' of github.com:espruino/BangleApps

pull/2372/head
Gordon Williams 2022-12-07 09:58:58 +00:00
commit 7cc1627653
14 changed files with 86 additions and 149 deletions

View File

@ -1,2 +1,3 @@
0.01: Initial version
0.02: Use default Bangle formatter for booleans
0.03: Drop duplicate alarm widget

View File

@ -1,7 +1,7 @@
{
"id": "noteify",
"name": "Noteify",
"version": "0.02",
"version": "0.03",
"description": "Write notes using an onscreen keyboard and use them as custom messages for alarms or timers.",
"icon": "app.png",
"tags": "tool,alarm",
@ -9,8 +9,7 @@
"readme": "README.md",
"storage": [
{"name":"noteify.app.js","url":"app.js"},
{"name":"noteify.img","url":"app-icon.js","evaluate":true},
{"name":"noteify.wid.js","url":"widget.js"}
{"name":"noteify.img","url":"app-icon.js","evaluate":true}
],
"data": [{"name":"noteify.json"}],
"dependencies": {"scheduler":"type","textinput":"type"},

View File

@ -1,8 +0,0 @@
WIDGETS["alarm"]={area:"tl",width:0,draw:function() {
if (this.width) g.reset().drawImage(atob("GBgBAAAAAAAAABgADhhwDDwwGP8YGf+YMf+MM//MM//MA//AA//AA//AA//AA//AA//AB//gD//wD//wAAAAADwAABgAAAAAAAAA"),this.x,this.y);
},reload:function() {
// don't include library here as we're trying to use as little RAM as possible
WIDGETS["alarm"].width = (require('Storage').readJSON('sched.json',1)||[]).some(alarm=>alarm.on&&(alarm.hidden!==false)) ? 24 : 0;
}
};
WIDGETS["alarm"].reload();

View File

@ -5,3 +5,5 @@ Addict.
0.04: New layout.
0.05: Add widget field, tweak layout.
0.06: Add compatibility with Fastload Utils.
0.07: Remove just the specific listeners to not interfere with Quick Launch
when fastloading.

View File

@ -1,69 +1,10 @@
{
/*
Bluetooth.println(JSON.stringify({t:"intent", action:"", flags:["flag1", "flag2",...], categories:["category1","category2",...], mimetype:"", data:"", package:"", class:"", target:"", extra:{someKey:"someValueOrString"}}));
Bluetooth.println(JSON.stringify({t:"intent", action:"", flags:["flag1", "flag2",...], categories:["category1","category2",...], mimetype:"", data:"", package:"", class:"", target:"", extra:{someKey:"someValueOrString"}}));
Podcast Addict is developed by Xavier Guillemane and can be downloaded on Google Play Store: https://play.google.com/store/apps/details?id=com.bambuna.podcastaddict&hl=en_US&gl=US
Podcast Addict can be controlled through the sending of remote commands called 'Intents'.
Some 3rd parties apps specialized in task automation will then allow you to control Podcast Addict. For example, you will be able to wake up to the sound of your playlist or to start automatically playing when some NFC tag has been detected.
In Tasker, you just need to copy/paste one of the following intent in the task Action field ("Misc" action type then select "Send Itent") .
If you prefer Automate It, you can use the Podcast Addict plugin that will save you some configuration time (https://play.google.com/store/apps/details?id=com.smarterapps.podcastaddictplugin )
Before using an intent make sure to set the following:
Package: com.bambuna.podcastaddict
Class (UPDATE intent only): com.bambuna.podcastaddict.receiver.PodcastAddictBroadcastReceiver
Class (every other intent): com.bambuna.podcastaddict.receiver.PodcastAddictPlayerReceiver
Here are the supported commands (Intents) :
com.bambuna.podcastaddict.service.player.toggle Toggle the playlist
com.bambuna.podcastaddict.service.player.stop Stop the player and release its resources
com.bambuna.podcastaddict.service.player.play Start playing the playlist
com.bambuna.podcastaddict.service.player.pause Pause the playlist
com.bambuna.podcastaddict.service.player.nexttrack Start playing next track
com.bambuna.podcastaddict.service.player.previoustrack Start playing previous track
com.bambuna.podcastaddict.service.player.jumpforward Jump 30s forward
com.bambuna.podcastaddict.service.player.jumpbackward Jump 15s backward
com.bambuna.podcastaddict.service.player.1xspeed - Disable the variable playback speed
com.bambuna.podcastaddict.service.player.1.5xspeed Force the playback speed at 1.5x
com.bambuna.podcastaddict.service.player.2xspeed Force the playback speed at 2.0x
com.bambuna.podcastaddict.service.player.stoptimer Disable the timer
com.bambuna.podcastaddict.service.player.15mntimer Set the timer at 15 minutes
com.bambuna.podcastaddict.service.player.30mntimer Set the timer at 30 minutes
com.bambuna.podcastaddict.service.player.60mntimer Set the timer at 1 hour
com.bambuna.podcastaddict.service.update Trigger podcasts update
com.bambuna.podcastaddict.openmainscreen Open the app on the Main screen
com.bambuna.podcastaddict.openplaylist Open the app on the Playlist screen
com.bambuna.podcastaddict.openplayer Open the app on the Player screen
com.bambuna.podcastaddict.opennewepisodes Open the app on the New episodes screen
com.bambuna.podcastaddict.opendownloadedepisodes Open the app on the Downloaded episodes screen
com.bambuna.podcastaddict.service.player.playfirstepisode Start playing the first episode in the playlist
com.bambuna.podcastaddict.service.player.customspeed Select playback speed
In order to use this intent you need to pass a float argument called "arg1". Valid values are within [0.1, 5.0]
com.bambuna.podcastaddict.service.player.customtimer Start a custom timer
In order to use this intent you need to pass an int argument called "arg1" containing the number of minutes. Valid values are within [1, 1440]
com.bambuna.podcastaddict.service.player.deletecurrentskipnexttrack Delete the current episode and skip to the next one. It behaves the same way as long pressing on the player >| button, but doesn't display any confirmation popup.
com.bambuna.podcastaddict.service.player.deletecurrentskipprevioustrack Delete the current episode and skip to the previous one. It behaves the same way as long pressing on the player |< button, but doesn't display any confirmation popup.
com.bambuna.podcastaddict.service.player.boostVolume Toggle the Volume Boost audio effect
You can pass a, optional boolean argument called "arg1" in order to create a ON or OFF button for the volume boost. Without this parameter the app will just toggle the current value
com.bambuna.podcastaddict.service.player.quickBookmark Creates a bookmark at the current playback position so you can easily retrieve it later.
com.bambuna.podcastaddict.service.download.pause Pause downloads
com.bambuna.podcastaddict.service.download.resume Resume downloads
com.bambuna.podcastaddict.service. download.toggle Toggle downloads
com.bambuna.podcastaddict.service.player.favorite Mark the current episode playing as favorite.
com.bambuna.podcastaddict.openplaylist Open the app on the Playlist screen
You can pass an optional string argument called "arg1" in order to select the playlist to open. Without this parameter the app will open the current playlist
Here's how it works:
##AUDIO## will open the Audio playlist screen
##VIDEO## will open the Video playlist screen
##RADIO## will open the Radio screen
Any other argument will be used as a CATEGORY name. The app will then open this category under the playlist CUSTOM tab
You can pass an optional boolean argument called "arg2" in order to select if the app UI should be opened. Without this parameter the playlist will be displayed
You can pass an optional boolean argument called "arg3" in order to select if the app should start playing the selected playlist. Without this parameter the playback won't start
Since v2020.3
com.bambuna.podcastaddict.service.full_backup Trigger a full backup of the app data (relies on the app automatic backup settings for the folder and the # of backup to keep)
This task takes a lot of resources and might take up to a minute to complete, so please avoid using the app at the same time
Since v2020.15
com.bambuna.podcastaddict.service.player.toggletimer This will toggle the Sleep Timer using the last duration and parameter used in the app.
Since v2020.16
com.bambuna.podcastaddict.service.player.togglespeed This will toggle the Playback speed for the episode currently playing (alternate between selected speed and 1.0x).
Podcast Addict is developed by Xavier Guillemane and can be downloaded on Google Play Store: https://play.google.com/store/apps/details?id=com.bambuna.podcastaddict&hl=en_US&gl=US
How to use intents to control Podcast Addict: https://podcastaddict.com/faq/130
*/
let R;
@ -116,11 +57,11 @@ let touchHandler = function(_, xy) {
y = xy.y;
len = (R.w<R.h+1)?(R.w/3):(R.h/3);
// doing a<b+1 seemed faster than a<=b, also using a>b-1 instead of a>b.
// doing a<b+1 seemed faster than a<=b, also using a>b-1 instead of a>=b.
if ((R.x-1<x && x<R.x+len) && (R.y-1<y && y<R.y+len)) {
//Menu
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
Bangle.removeListener("touch", touchHandler);
Bangle.removeListener("swipe", swipeHandler);
backToMenu = true;
E.showMenu(paMenu);
} else if ((R.x-1<x && x<R.x+len) && (R.y2-len<y && y<R.y2+1)) {
@ -129,13 +70,13 @@ let touchHandler = function(_, xy) {
gadgetbridgeWake();
} else if ((R.x2-len<x && x<R.x2+1) && (R.y-1<y && y<R.y+len)) {
//Srch
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
Bangle.removeListener("touch", touchHandler);
Bangle.removeListener("swipe", swipeHandler);
E.showMenu(searchMenu);
} else if ((R.x2-len<x && x<R.x2+1) && (R.y2-len<y && y<R.y2+1)) {
//Speed
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
Bangle.removeListener("touch", touchHandler);
Bangle.removeListener("swipe", swipeHandler);
E.showMenu(speedMenu);
} else if ((R.x-1<x && x<R.x+len) && (R.y+R.h/2-len/2<y && y<R.y+R.h/2+len/2)) {
//Previous
@ -248,8 +189,6 @@ let backToGfx = function() {
E.showMenu();
g.clear();
g.reset();
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
setUI();
gfx();
backToMenu = false;

View File

@ -2,7 +2,7 @@
"id": "podadrem",
"name": "Podcast Addict Remote",
"shortName": "PA Remote",
"version": "0.06",
"version": "0.07",
"description": "Control Podcast Addict on your android device.",
"readme": "README.md",
"type": "app",

View File

@ -12,3 +12,4 @@
Add setting to disable scheduler alarm
0.10: Fix: Do not wake when falling asleep
0.11: Minor tweaks
0.12: Support javascript command to execute as defined in scheduler 'js' configuration

View File

@ -173,12 +173,16 @@ if (nextAlarmDate !== undefined) {
setTimeout(load, 1000);
} else if (measure && now >= minAlarm && swest === false) {
addLog(now, "alarm");
buzz();
measure = false;
if (config.settings.disableAlarm) {
// disable alarm for scheduler
nextAlarmConfig.last = now.getDate();
require("Storage").writeJSON("sched.json", alarms);
if (nextAlarmConfig.js) {
eval(nextAlarmConfig.js); // run nextAlarmConfig.js if set
} else {
buzz();
if (config.settings.disableAlarm) {
// disable alarm for scheduler
nextAlarmConfig.last = now.getDate();
require('Storage').writeJSON('sched.json', alarms);
}
}
}
});

View File

@ -2,7 +2,7 @@
"id": "sleepphasealarm",
"name": "SleepPhaseAlarm",
"shortName": "SleepPhaseAlarm",
"version": "0.11",
"version": "0.12",
"description": "Uses the accelerometer to estimate sleep and wake states with the principle of Estimation of Stationary Sleep-segments (ESS, see https://ubicomp.eti.uni-siegen.de/home/datasets/ichi14/index.html.en). This app will read the next alarm from the alarm application and will wake you up to 30 minutes early at the best guessed time when you are almost already awake.",
"icon": "app.png",
"tags": "alarm",

View File

@ -4,3 +4,5 @@
0.04: New layout.
0.05: Add widgets field. Tweak layout.
0.06: Make compatible with Fastload Utils app.
0.07: Remove just the specific listeners to not interfere with Quick Launch
when fastloading.

View File

@ -57,8 +57,8 @@ let touchHandler = function(_, xy) {
// doing a<b+1 seemed faster than a<=b, also using a>b-1 instead of a>b.
if ((R.x-1<x && x<R.x+len) && (R.y-1<y && y<R.y+len)) {
//Menu
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
Bangle.removeListener("touch", touchHandler);
Bangle.removeListener("swipe", swipeHandler);
backToMenu = true;
E.showMenu(spotifyMenu);
} else if ((R.x-1<x && x<R.x+len) && (R.y2-len<y && y<R.y2+1)) {
@ -67,13 +67,13 @@ let touchHandler = function(_, xy) {
gadgetbridgeWake();
} else if ((R.x2-len<x && x<R.x2+1) && (R.y-1<y && y<R.y+len)) {
//Srch
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
Bangle.removeListener("touch", touchHandler);
Bangle.removeListener("swipe", swipeHandler);
E.showMenu(searchMenu);
} else if ((R.x2-len<x && x<R.x2+1) && (R.y2-len<y && y<R.y2+1)) {
//Saved
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
Bangle.removeListener("touch", touchHandler);
Bangle.removeListener("swipe", swipeHandler);
E.showMenu(savedMenu);
} else if ((R.x-1<x && x<R.x+len) && (R.y+R.h/2-len/2<y && y<R.y+R.h/2+len/2)) {
//Previous
@ -89,7 +89,7 @@ let touchHandler = function(_, xy) {
}
};
// Swipe handler for main layout, used to jump backward and forward within a podcast episode.
// Swipe handler for main layout, used for next previous track.
let swipeHandler = function(LR, _) {
if (LR==-1) {
spotifyWidget("NEXT");
@ -125,8 +125,6 @@ let backToGfx = function() {
E.showMenu();
g.clear();
g.reset();
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
setUI();
gfx();
backToMenu = false;
@ -286,6 +284,5 @@ let savedMenu = {
Bangle.loadWidgets();
setUI();
widgetUtils.hide();
gfx();
}

View File

@ -1,7 +1,7 @@
{
"id": "spotrem",
"name": "Remote for Spotify",
"version": "0.06",
"version": "0.07",
"description": "Control spotify on your android device.",
"readme": "README.md",
"type": "app",

View File

@ -20,7 +20,7 @@
"On": "Ein",
"Off": "Aus",
"Ok": "OK",
"New Timer": "Neuer Kurzzeitwecker",
"New Timer": "Neuer Timer",
"(repeat)": "(Wiederholung)",
"music": "Musik",
"Keep Msgs": "Nachrichten behalten",
@ -148,7 +148,7 @@
"Whitelist": "Whitelist",
"Select Clock": "Uhr auswählen",
"Disable": "Deaktivieren",
"Timer": "Kurzzeitwecker",
"Timer": "Timer",
"Error in settings": "Fehler in den Einstellungen",
"Set Time": "Zeit einstellen",
"ALARM": "ALARM",

View File

@ -6,34 +6,34 @@
"Hours": "Timmar",
"Minutes": "Minuter",
"Enabled": "Aktiverad",
"New Alarm": "Ny alarm",
"New Alarm": "Nytt larm",
"Save": "Spara",
"Back": "Tillbaka",
"Repeat": "Upprepning",
"Delete": "Radera",
"ALARM!": "ALURH!",
"ALARM!": "LARM!",
"Sleep": "Sömn",
"circle 3": "cirkel 3",
"circle 1": "cirkel 1",
"music": "musik",
"week": "vecka",
"Keep Msgs": "Behåll meddelanden",
"Auto snooze": "Automatisk snooze",
"Auto snooze": "Auto-snooza",
"step length": "steglängd",
"Circle": "Cirkel",
"data": "uppgifter",
"colorize icon": "färglägga ikonen",
"min. confidence": "Min. förtroende",
"show widgets": "visa widgets",
"colorize icon": "färglägg ikon",
"min. confidence": "min. konfidens",
"show widgets": "visa widgetar",
"valid period": "giltig period",
"Heartrate": "Hjärtfrekvens",
"distance goal": "mål för distans",
"distance goal": "distansmål",
"circle 4": "cirkel 4",
"circle count": "antal cirklar",
"minimum": "minimum",
"maximum": "maximal",
"New Timer": "Ny timer",
"battery warn": "batteri varning",
"battery warn": "batterivarning",
"heartrate": "hjärtfrekvens",
"circle 2": "cirkel 2",
"(repeat)": "(upprepning)",
@ -42,30 +42,30 @@
"No Messages": "Inga meddelanden",
"Show clocks": "Visa klockor",
"STEPS": "STEG",
"TAP right top/bottom": "TAP höger upp/ner",
"TAP right top/bottom": "KNACKA höger upp/ner",
"View Message": "Visa meddelande",
"Mark Unread": "Markera oläst",
"Are you sure": "Är du säker på att",
"Are you sure": "Är du säker",
"Delete all messages": "Radera alla meddelanden",
"Record Run": "Rekordkörning",
"Record Run": "Spåra löprunda",
"Unread timer": "Oläst timer",
"Vibration": "Vibrationer",
"Utils": "Användaruppgifter",
"Utils": "Verktyg",
"Quiet Mode": "Tyst läge",
"Passkey BETA": "Passkey BETA",
"Dark BW": "Mörk BW",
"BTNs 1:startlap 2:exit 3:reset": "BTN 1:startlap 2:exit 3:reset",
"start&lap/reset, BTN1: EXIT": "start&lap/återställning, BTN1: EXIT",
"BTNs 1:startlap 2:exit 3:reset": "BTN 1:starta varv 2:lämna 3:återställ",
"start&lap/reset, BTN1: EXIT": "starta&varv/återställ, BTN1: LÄMNA",
"BLE": "BLE",
"Programmable": "Programmerbar",
"Launcher Settings": "Inställningar för lanseringen",
"Vector font size": "Vektor teckensnittsstorlek",
"Launcher Settings": "Inställningar för launchern",
"Vector font size": "Storlek vektortypsnitt",
"Font": "Typsnitt",
"Yes\ndefinitely": "Ja\ndefinitivt",
"App Source\nNot found": "App-källa\nEj funnen",
"Make Connectable": "Gör det möjligt att ansluta",
"Make Connectable": "Gör anslutningsbar",
"HID": "HID",
"Bluetooth": "Bluetooth",
"Bluetooth": "Blåtand",
"Apps": "Appar",
"Piezo": "Piezo",
"LCD": "LCD",
@ -73,46 +73,46 @@
"Light BW": "Ljus BW",
"Background": "Bakgrund",
"Remove": "Ta bort",
"Highlight BG": "Markera BG",
"Highlight BG": "Markering BG",
"Customize": "Anpassa",
"Highlight FG": "Highlight FG",
"Highlight FG": "Markering FG",
"Background 2": "Bakgrund 2",
"LCD Brightness": "Ljusstyrka på LCD-skärmen",
"Add Device": "Lägg till enhet",
"Wake on BTN1": "Vakna BTN1",
"Wake on BTN2": "Vakna BTN2",
"Twist Timeout": "Twist Timeout",
"Wake on BTN1": "Vakna av BTN1",
"Wake on BTN2": "Vakna av BTN2",
"Twist Timeout": "Vridning Timeout",
"Wake on Touch": "Vakna vid beröring",
"LCD Timeout": "LCD Timeout",
"Foreground": "Förgrund",
"Connect device\nto add to\nwhitelist": "Anslut enhet\nför att lägga till\nvitlista",
"Wake on FaceUp": "Vakna på FaceUp",
"Connect device\nto add to\nwhitelist": "Anslut enhet\nför att lägga till\ni vitlistan",
"Wake on FaceUp": "Skärm upp väcker",
"Twist Threshold": "Tröskelvärde för vridning",
"Wake on BTN3": "Wake på BTN3",
"Wake on BTN3": "Vakna av BTN3",
"Clock Style": "Klockstil",
"Time Zone": "Tidszon",
"Twist Max Y": "Vridning Max Y",
"Stay Connectable": "Håll dig tillgänglig",
"This will remove everything": "Detta kommer att ta bort allt",
"Stay Connectable": "Håll anslutningsbar",
"This will remove everything": "Detta kommer ta bort allt",
"Turn Off": "Stäng av",
"Connectable": "Anslutningsbar",
"Flattening battery - this can take hours.\nLong-press button to cancel": "Platta batterier - detta kan ta flera timmar.\nTryck länge på knappen för att avbryta",
"Reset to Defaults": "Återställ till standardvärden",
"Flattening battery - this can take hours.\nLong-press button to cancel": "Töm batteri - detta kan ta flera timmar.\nTryck länge på knappen för att avbryta",
"Reset to Defaults": "Återställ standardvärden",
"Utilities": "Verktyg",
"Flatten Battery": "Platta batterier",
"Debug Info": "Info om felsökning",
"Reset Settings": "Återställa inställningar",
"Wake on Twist": "Väckning på Twist",
"Compact Storage": "Kompakt förvaring",
"Flatten Battery": "Töm batteri",
"Debug Info": "Felsökningsinfo",
"Reset Settings": "Återställ inställningar",
"Wake on Twist": "Vakna av vridning",
"Compact Storage": "Komprimera lagring",
"Log": "Logg",
"Rewrite Settings": "Omskrivning av inställningar",
"Compacting...\nTakes approx\n1 minute": "Komprimering...\nTar ca.\n1 minut",
"Compacting...\nTakes approx\n1 minute": "Komprimerar...\nTar ca.\n1 minut",
"Storage": "Lagring",
"Second": "Andra",
"App Settings": "App-inställningar",
"Invalid settings": "Ogiltiga inställningar",
"Minute": "Protokoll",
"Sleep Phase Alarm": "Larm om sömnfas",
"Minute": "Minut",
"Sleep Phase Alarm": "Sömnfaslarm",
"No app has settings": "Ingen app har inställningar",
"Hour": "Timme",
"No Clocks Found": "Inga klockor hittades",
@ -124,16 +124,16 @@
"TIMER": "TIMER",
"on": "på",
"OFF": "OFF",
"Side": "Sidan",
"Side": "Sida",
"Sort Order": "Sortering",
"Left": "Vänster",
"Right": "Höger",
"Reset All": "Återställ alla",
"Widgets": "Widgets",
"Widgets": "Widgetar",
"goal": "mål",
"Vibrate": "Vibrera",
"Message": "Meddelande",
"Beep": "Piper",
"Beep": "Pip",
"Disable": "Inaktivera",
"Select Clock": "Välj klocka",
"Locale": "Lokalisering",
@ -145,14 +145,14 @@
"Timer": "Timer",
"BACK": "TILLBAKA",
"Error in settings": "Fel i inställningarna",
"Whitelist": "Whitelist",
"ALARM": "ALARM",
"Whitelist": "Vitlista",
"ALARM": "LARM",
"Hide": "Dölj",
"Connected": "Ansluten",
"Show": "Visa",
"On": "På",
"Ok": "Ok",
"No": "Ingen",
"No": "Nej",
"Settings": "Inställningar",
"steps": "steg",
"back": "tillbaka",
@ -162,7 +162,7 @@
"Loading": "Laddar",
"Music": "Musik",
"color": "färg",
"off": "off",
"off": "av",
"Off": "Av",
"Theme": "Tema",
"one": "ett",
@ -197,4 +197,4 @@
"ten to *$2": "tio i *$2",
"five to *$2": "fem i *$2"
}
}
}