-
No, I unfortunately haven't worked on it more. From what I can tell, it appears outside of my scope. I can't figure out where the base Android clock stores the alarms. Without that, all I can do is check the alarm within the next 24 hours, but that doesn't catch all alarms, nor does it catch repeats.
Modifying or using a different alarm app could work, but I was hoping to use the default app, as modifying or creating apps is not something I have a lot of experience with.
-
Okay, so this seems like it has the basic functionality I want. Utilizing tasker and taking code from the "alarm" app, I was able to get the basics of what I want.
I wrote a task in "tasker" (which cost $3, but I was willing to make that purchase for this), which fires when the Android clock app exits. What it does is looks for the next alarm, then writes that alarm to bangle. This is sent via Android intent. Tasks are:
Test next alarm
Send intentSend intent looks like this:
Action: com.banglejs.uart.tx
Extra: line:var alarm = require("sched").newDefaultAlarm();var time = require("time_utils").decodeTime(alarm.t);var date = new Date();time.h="%na_time".substring(0,2);time.m="%na_time".substring(3);date.setDate(%na_day);date.setMonth(%na_month-1);date.setFullYear(%na_year);alarm.on=true;alarm.t = require("time_utils").encodeTime(time); alarm.last = alarm.t < require("time_utils").getCurrentTimeMillis() ? new Date().getDate() : 0; if(date) alarm.date = date.toLocalISOString().slice(0,10);var array =[]; array[0] = alarm;require("sched").setAlarms(array);The extra is a mess, so here it is more pretty:
line: var alarm = require("sched").newDefaultAlarm(); var time = require("time_utils").decodeTime(alarm.t); var date = new Date(); time.h = "%na_time".substring(0, 2); time.m = "%na_time".substring(3); date.setDate( % na_day); date.setMonth( % na_month - 1); date.setFullYear( % na_year); alarm.on = true; alarm.t = require("time_utils").encodeTime(time); alarm.last = alarm.t < require("time_utils").getCurrentTimeMillis() ? new Date().getDate() : 0; if (date) alarm.date = date.toLocalISOString().slice(0, 10); var array = []; array[0] = alarm; require("sched").setAlarms(array);
This is in no way elegant. It works, at least, but there are some issues I'll try to work on later.
- This removes literally everything set for alarms, and overwrites it with only the next set alarm from Android.
- It does not currently set alarms for repeat.
- It only sets the next alarm, ignoring any alarm after that.
1 can probably be fixed with some more effort and if/else statements to preserve current alarms, and not set if an alarm is already on at that time. I wrote all of the above code from my phone, which is a pain, so I will look into that one later. Right now, this makes setting alarms from the watch a waste of time, since they get deleted with this currently.
2 seems to be an issue with tasker/clock app interaction. I can't figure out how to get the repeat data into tasker. There are other clock apps that reportedly work better, but I wanted to see what I can do with the current app.
3 also seems to be a tasker/clock app thing. Can probably write something to scrape the clock app database and see what other alarms are there. Might also help with 2. Again, don't want to do this on my phone.I'll work on this more in the next few days, but wanted to get this written down somewhere so I can show it's possible. If you have any pointers on the code above or my thoughts on the list items, please let me know!
- This removes literally everything set for alarms, and overwrites it with only the next set alarm from Android.
-
-
And then no DISMISS/OPEN command with a matching ID for those
I get ~3 emails every time I log into my alternate Gmail because of mail forwarding, so I just didn't tap on those while testing this. Gmail has been functioning without issue.
My mobile carrier also allows for RCS, so I have been trying that as well. RCS appears to dismiss appropriately, but I still can't get the app to open on next phone unlock by swiping to the check, which works for Gmail.
-
Been doing some more "testing" throughout the day with the texts I get. Turns out my group texts can be dismissed, but I can't get the check swipe to work with those. But none of the individual people's texts can be dismissed. I wonder if this is SMS vs MMS? But that wouldn't make sense since it's a simple interaction with the notifications.
-
I've attached a log file of a few interactions. I received email warning me I logged into my Google voice, and those dismissed without issue. The text messages sent from my Google voice weren't dismissed like I would expect.
Gadgetbridge is version 0.75.0a, from play store.
Google meet tried to send a text, but I used Google chat and the notifications were dismissed correctly. However, I wasn't able to open the chat app with the check swipe.
-
I rechecked the steps, and I think I did them correctly. I activated settings as directed and all permissions are granted to Gadgetbridge.
I'm testing by texting myself on Google Voice, which shouldn't present any issues. It appears that email notifications can be dismissed correctly, and open in the app correctly, but text messages aren't behaving as nicely. The log files from Gadgetbridge do show:
{"t":"notify","n":"DISMISS","id":1691496788}
Which is properly dismissing emails. So I wonder if this is due to a setting within the messages app, or something else internal to the phone. Any ideas on how to further test this?
-
-
I'm writing a menu with multiple boolean variable. The menu is populated on load, so I don't know ahead of time how many variables there are or what they are named. I am having an issue saving the value on change. My code is as follows:
data = getDataStreams(); Object.keys(data).forEach(function(k){ name = data[k].description.split(" / ")[0]; if (!settings.keys[name]) { // Setting doesn't exist, so we assume it's false settings.keys[name] = false; } submenu[name]= {value:settings.keys[name], onchange: v => { settings.keys[name] = v; writeSettings(); }}; });
the "data" variable looks like this:
[{"description":"DCP battery voltage / USGS-03272100-1964fee2501b43c5b7b807b687319588"}, {"description":"Discharge / USGS-03272100-1db72201226e4f50a94d0b65abc8e7a5"}, {"description":"Gage height / USGS-03272100-56a7245f4b47438cb79c40f0d00605ba"}, {"description":"Temperature, water / USGS-03272100-f8e8a724a5c3498ca11bf1a31be5a537"}]
The submenu populates like this:
{ "": { "title": "-- DataStreams --" }, "< Back": function () {E.showMenu(menu);}, "DCP battery voltage": { "value": false, "onchange": function (v) { settings.keys[name] = v; writeSettings(); } }, "Discharge": { "value": true, "onchange": function (v) { settings.keys[name] = v; writeSettings(); } }, "Gage height": { "value": true, "onchange": function (v) { settings.keys[name] = v; writeSettings(); } }, "Temperature, water": { "value": true, "onchange": function (v) { settings.keys[name] = v; writeSettings(); } } }
The issue is that when the "onchange" function runs, name is set to the most recent loop of the foreach, herein "Temperature, water". However, I want it to reflect what the variable "name" was set to when the submenu item was added to the submenu object.
I could convert the function to a string, replace the variable with its value, and then convert back to function within each iteration of the loop, but that strikes me as messy. Does anyone know a better way of doing this?
-
-
-
I am having a potential issue with the messages UI app. I can receive text/email/call notifications fine. I see the swipe interactions with check and X. I can answer and decline phone calls using these swipes, but I cannot seem to get the swipes to clear notifications or open notifications on the phone per the expected behavior in the app instructions. If this user error, a bug, or the expected actions are different?
For reference, I am using Bangle 2, gadgetbridge with message ui v0.73, and phone is Moto G Power 2022.
-
In terms of alarms there is actually an alarm sync thing in Gadgetbridge already
Is this the ability to set alarms on the watch from the Android alarm app, or to set alarms for the watch from the gadgetbridge app? Because I'm seeing the ability to turn on and set alarm for bangle on the gadgetbridge app, but I would REALLY like the ability for the alarms from the Android app be synced to bangle.
As usual, easily could be user error...
-
Just getting started and I'm using most of these features of circles clock, and most of them seem to work!
However, I can't seem to get it to display when my next set alarm is. Cycling through the circles doesn't even provide the alarm option. Possible it got broken with the move, or it's certainly possible to be user error!
-
-
I am trying to write an app to fetch data from a website, but I was reading on here that the watch does not have its own WiFi (obviously), but Gadgetbridge does not like to have internet functionality for privacy reasons. Is there any way for me to fetch information from a URL? For reference, I'm trying to get the data from this link here:
It returns JSON already, so easy to manage. I tried uploading the code to the IDE, but it doesn't recognize fetch which may be because of the aforementioned lack of internet functionality. Does anyone know if I'm wrong, or if it's possible another way?
You're a little bit off on my overall intended use case. I think what you're describing is vibrating the watch when the alarm goes off. Bangle can and does do this easily. This is a majority of people's use cases, and multiple tasker integration apps feature this.
What I want to do is have the alarms on my phone set on my watch. This way, my watch will have the same active alarms as my phone, so that I can see what the next upcoming alarm is without looking at my phone.
The priority on this is understandably low, as it wouldn't change my life much at all, but it would be nice.