-
Nevermind, got it. A keyboard needs to look something like this:
exports.input = function(options) { options = options||{}; var text = options.text; if ("string"!=typeof text) text=""; SOME FUNCTIONS AND VARIABLES return new Promise((resolve,reject) => { layout = new Layout( { LAYOUT } ,{back: ()=>{ Bangle.setUI(); g.clearRect(Bangle.appRect); resolve(text); }}); g.clearRect(Bangle.appRect); layout.render(); }); };
I'll wrap it up into an app next.
-
Hi all,
Safe to say I've got the bug for writing apps for the Bangle2! But I'm not very experienced with javascript, and confused how to turn what I've written into a keyboard.
See here for an example of my multitap/T9 keyboard, using the layout library and the logic from here:
https://gist.github.com/sir-indy/12f334440894091fc7e64f7444df54c5
Try it out by loading it onto your watch as filenametextinput
, then use the Noteify app to try and write something.It can write text quite happily, but I'm stuck returning it to the app. Something to do with
resolve(text)
, but not sure what a resolve is, or how to get it to work. Can anyone offer any suggestions? -
Thank you all for your feedback, I've opened a new pull request: https://github.com/espruino/BangleApps/pull/1788
@PeerDavid I'm keeping your name in as the original creator, I wouldn't want to overwrite your work and pretend the original didn't exist, that wouldn't be in the spirit of open source. I did reuse parts of your app.
@Kosi2801 Thank you for your kind words. Being able to set seconds was the main point for writing this app, and for the pause/continue function to work it needs to show seconds. It should still be easy to set the hours and minutes even with the seconds showing.
For the 'Time now' text, I did consider that, but finally left the layout simple and clean.
If you really want these features though, feel free to add them into the code and submit a pull request yourself, I'm not an expert in javascript or the Bangle but I'll help you if you want. -
There's a new version of the app here: https://sir-indy.github.io/BangleApps/?id=smpltmr
Note that this is an update of the existing Simple Timer app, so delete the old version and install this one.
I've tweaked the layout library to center align all images, and use configurable size text for buttons (though I don't use text on the buttons here, that's for the next project).
@PeerDavid, can you let me know if that looks ok to you?
@HughB, good catch with the button press, you're correct I forgot about that. I've set it up so the button starts and stops the timer, leaving a long button press to exit the app. This seems more standard compared to other apps. If you don't like the long press I recommend the Close Button Widget, it gives you an exit button in every app,I use this myself in preference to a long press on the button. -
-
Thank you, I did try your Simple Timer, but it didn't have an option for seconds. I also tried Touch Timer, which did have seconds, but didn't use sched so didn't run in the background.
Now that I look at the code for Simple Timer they are very similar! Rather than replace, how would you feel about merging? My interface, our shared use of the sched library, and I like your buzz touch feedback, I will steal that with pride (and attribution to you of course!).
However I have no wish to step on any toes, if you're happy to keep your timer separate that just means more choice for all the other Bangle users.
-
Thanks for the help, I've had a look and decided it's too complicated for me at the moment! I'll be keeping things simple until I have a bit more practice with javascript and the BangleJS2.
I'd like to get some snazzy animations eventually though, the BangleJS2 is a great smart watch for me, just needs a bit of pizzazz to impress my less techy friends! -
@Alessandro Thank you!
@HughB Thank you, and excellent point to replace the words with symbols. I've done an update but can't get them centred, might have to open an issue about that in the layout library. For the colours, they use the standard theme colours, so you're free to change your theme for whatever colours you prefer. I've made the button slightly bigger, but don't want to take too much space from the time picker.
@nicoboss Glad to see we think the same, that's exactly how I'm using it!
@Gordon Thank you. Good point about the
sched
library, it made this much easier to write by leaning on that, and thelayout
library! -
I've made a new timer app, try it here: https://sir-indy.github.io/BangleApps/?id=timersimple
I found that once a timer was started there was no way to view how much time was left, until it finishes and the alert goes off. Also, no way to specify seconds.
So this is a new time entry screen, and a timer view screen, showing a countdown. It uses the
sched
library, searching for a specific id.My question is, should I release this as a standalone app for a single timer, or look at including it in the existing Alarms and Timers app? Would that make the Alarms and Timers app more complicated than it needs to be, or would it be useful? Being standalone makes it very fast to access, with a swipe in pattern launcher.
If anyone has an opinion I'd be interested to hear it, but I'm leaning towards keeping it as a separate app.
-
Hi, I'm looking for some help on how to animate watchfaces. It's been mentioned a few times that it's possible to draw things to an off screen buffer, then move that onto the screen, but I'm not clear how.
If anyone knows and can point me to documentation or an example I'd be very grateful. I'm aiming to make something like the attached screenshots, to add to my Fuzzy Text Clock
Screenshots from here: https://store-beta.rebble.io/app/555283c7efff0cc8e50000b0, https://store-beta.rebble.io/app/5616a3d3c902b64981000090, https://apps.rebble.io/en_US/application/58060628c988667eaa00009e
-
Strangely the values I posted were from setting.app.js on my watch (v0.42 according to the app loader). Using the official app loader, deleted Settings and re-added it, now it's the proper theme, with the background on both dark and light theme.
I do have the quiet mode scheduler app installed, but wouldn't think that would change a different file. I'll see if it changes back tomorrow after the quiet mode has kicked in again overnight.Edit: No change overnight, so doesn't look like quiet mode scheduler has affected it.
-
-
-
-
-
Hi,
I've only written one clock so far (and editing another), but it was fun! I had a a question about the best way to update the clock face:
On the pebble, there was a function
rocky.on('minutechange', function(event) {
that would fire every minute, on the minute. Is there a similar function for the bangle?
I know I can set a timer to go off every sixty seconds, but is there a way to start at 0 seconds past the minute? Or on exactly 0 seconds and 30 seconds past?Thank you.
-
Hi All,
I've designed a new clock: https://sir-indy.github.io/BangleApps/?id=fuzzyw
It's a remake of one of my favourite pebble watchfaces, Fuzzy Text International: https://github.com/hallettj/Fuzzy-Text-InternationalEdit: added screenshots.
Any volunteers to try it out before I push it to the main repo? I've tested it myself, but it would be nice to see what other people think first.
Thank you!
-
Thank you all, pull request submitted!
And @Gordon, thank you in particular for a great watch! I'm looking forward to writing an app from scratch next! -
I've been using the pebble app, the white on red text means low battery, so sounds like you're out of juice.
Is the power cable connected ok? Make sure it's plugged in, switched on, and attached to the watch the correct way round. Leave it for a few hours, then press the button (think it was just a short press when I did it). -
Hi All,
Is there any particular etiquette or rules to follow for editing someone elses app?I've been using the pebble clock (I loved my pebble, the Bangle 2 is the only device that even comes close to it), and have made some changes to suit me better. I've been careful to hide my changes behind settings so as default it functions exactly as the original app did.
Should I push it through to the main app page, or contact the original author first, and if so how?
I installed the SleepLog app yesterday, that says it uses the internal temperature sensor to help identify if it's on a wrist, there might be something in that app you could reuse rather than start from scratch.