Bangle.showLauncher() - not showing launcher

Posted on
  • Hi there.

    I deleted one of the launchers on the bangle and now Bangle.showLauncher() will not run.
    I can run one of the launchers by starting it through the IDE but its like the bangle can no longer find a launcher ? I am on v2.08.167 firmware.

    How does the Bangle know which launcher to select if you have more than one installed.

    Hugh

  • How does the Bangle know which launcher to select if you have more than one installed.

    It searches for *.info files and finds one that mentions launcher

    So if it's no longer running an existing launcher, maybe it's possible that at some point you created a launcher app with the same ID as the default launcher, so when you then uninstalled that app, it deleted the launcher.info file?

  • I have 3 launchers on my bangle with .info files as below.
    None of them will launch by Bangle.showLauncher().

    dtlaunch.info

    {"id":"dtlaunch","name":"Desktop Launcher","type":"launch","src":"dtlaunc­h.app.js","icon":"dtlaunch.img","version­":"0.03","files":"dtlaunch.info,dtlaunch­.app.js,dtlaunch.img"}
    

    and launch.info

    {"id":"launch","name":"Launcher","type":­"launch","src":"launch.app.js","sortorde­r":-10,"version":"0.04","files":"launch.­info,launch.app.js"}
    

    and tapelauncher.info

    {"id":"tapelauncher","name":"Tape Launcher","type":"launch","version":"0.0­1","files":"tapelauncher.info,tapelaunch­.app.js,tapelaunch.img"}
    
  • Very odd - and your Bangle.js firmware is at 2v08 or later?

    The actual code show showLauncher is:

      var l = require("Storage").list(/\.info$/).map(f­ile => {
        var app = require("Storage").readJSON(file,1);
        if (app && app.type == "launch") return app;
      }).find(x=>x);
      if (l) load(l.src);
      else E.showMessage("Launcher\nnot found");
    

    So it should be fine.

    However it seems that the file that's added for your tapelauncher.info is broken - there is no src field.

    So in that case, if tapelauncher.info happened to be the first file, I guess launching would fail.

  • I wonder if there is no src element as the name of the app is different to the id in the apps.json file.
    I will get this fixed. Just hoping it is not going to cause upgrade issues. Does an install through the AppLoader site first delete all the files as per the info file on the Bangle storage and then install them again from the github location? If so then I think there wont be any complications if I change all the entries to say tapelaucher.

    { "id": "tapelauncher",
      "name": "Tape Launcher",
      "icon": "icon.png",
      "version":"0.01",
      "description": "An App launcher, icons displayed in a horizontal tape, swipe or use buttons",
      "readme": "README.md",
      "tags": "tool,system,launcher",
      "type":"launch",
      "storage": [
        {"name":"tapelaunch.app.js","url":"app.j­s"},
        {"name":"tapelaunch.img","url":"icon.js"­,"evaluate":true}
      ]
    },
    
  • Thanks for you help @Gordon. I am back up and running. Have fixed the above issue. Just installed the App through MyLoader and got a correct .info file as below.

    {"id":"tapelauncher","name":"Tape Launcher","type":"launch","src":"tapelau­ncher.app.js","icon":"tapelauncher.img",­"version":"0.02","files":"tapelauncher.i­nfo,tapelauncher.app.js,tapelauncher.img­"}
    

    Maybe there is a need for the Travis CI tests to look for App entries that dont match the id properly in the apps.json file.

    I wondering what the recommended way to switch to a different loader is meant to be ? So far I have had to delete the others in order to get a different one to work.

  • Maybe there is a need for the Travis CI tests to look for App entries that dont match the id properly in the apps.json file.

    There are Travis CI tests for exactly that - or should be? If you supply a filename that doesn't exist, it complains. You can also run them locally with npm test

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

Bangle.showLauncher() - not showing launcher

Posted by Avatar for HughB @HughB

Actions