"Making An App" a couple snags

Posted on
  • I followed the "making an app" section on the page https://www.espruino.com/Bangle.js+Clock­
    and was able to set the app as my primary clock, and try it out for a day or two. I wanted to make a couple last minute tweaks and wanted to replace the app, but writing over the file didn't show my changes. So I tried, using the IDE, to remove the files associated with my app, and now my bangleJS2 only shows a black screen, no matter what I do.
    I went to the app loader, and saw my app listed as "unknown app bradbury (unknown version)" and when I clicked the trash icon, I was given the alert "Unknown app bradbury removal failed, TypeError: Cannot read properties of undefined (reading 'split')" and my watch says "Erasing bradbury..." but stays there, and does nothing beyond that. I tried long-press rebooting, but only returned to a black screen. I repeated the process to the same results.

    I'm not sure what to do, and I'm fine with factory resetting if necessary, but not sure how to do that since I only see a black screen.

  • Ok, I removed the image used as the background of the watch, and once I replaced the image, everything works once again, including the updated bradbury.app.js file. Strange thing is that while I understand why my watch face didn't work without the image, I don't understand why the launcher and menus didn't work during that time. Is it because without the image my app crashed, and the Bangle.setUI("clock"); function thus couldn't be accessed?

  • If you can share you code I could have a look.

  • Is it because without the image my app crashed, and the Bangle.setUI("clock"); function thus couldn't be accessed?

    I think that's it, yes...

    Interesting about the app loader failing to remove the app. I've just made some changes to the app loader that'll fix that in the future :)

  • Thanks, I guess I initially tested it the wrong way by uploading a png through the IDE and having my code reference that file. I was unable to change to any other clock in settings/system/select clock, no matter what I did as far as removing the files through the IDE in any order. So I did a factory reset.

    I finally figured out how to use the image string thing, and finally found the right place on my new github account, from when I had tried to follow the tutorial a few nights ago.

    My github fork seems to be running, but when I try to upload from the apploader to my JS2, it loads up to about 95% rather quickly, then stays there indefinitely. I'm sure I must have missed some minute detail. I'll post some links to my github fork and the app in the loader, it's a clock called Bradbury.

    https://github.com/nomusictuesdays/Bangl­eApps/tree/master/apps/bradbury
    https://nomusictuesdays.github.io/Bangle­Apps/?q=bradbury

  • @NoMusicTuesdays By the way, very nice watch face!

    I found the original watch, the spirit of which is well conveyed. The original watch is also cool! https://www.youtube.com/watch?v=q3Eo0FTo­vcI

    As an idea for the future: if you have time and interest, you can add a notepad function. I see it like this: press REC and typing opens (there are several standard text typing applications for use). And by pressing to PLAY text notes could be viewed :) It would be convenient for small TODO sheets and it would be just great.

  • I think a hint might be, if you go to https://github.com/nomusictuesdays/Bangl­eApps/tree/master/apps/bradbury you'll see a red x in the top right.

    Click it, then 'details' and you'll see https://github.com/nomusictuesdays/Bangl­eApps/runs/6168879819?check_suite_focus=­true

    PARSE OF /home/runner/work/BangleApps/BangleApps/­bin/../apps/bradbury/app-icon.js failed.

    It's actually my fault because I broke https://www.espruino.com/Image+Converter­ a few days ago. It's now fixed, but basically you need to replace )+strPostfix at the end of the app-icon.js file with ))

  • Thanks for the tip @Gordon it's working now.

    @Serj nice idea, I think it would be great to limit the number of characters in the note feature, in the spirit of the original's record feature.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

"Making An App" a couple snags

Posted by Avatar for NoMusicTuesdays @NoMusicTuesdays

Actions