The Pattern Launcher Rocks

Posted on
Page
of 2
Prev
/ 2
  • Hi Dirk @dirkhillbrecht, yes it works exactly how you described it! It does not replace a normal launcher application. E.g. my use-case is to launch apps that I use all the time with the pattern launcher directly from the clock face (I constantly need a stopwatch and a timer) and for less used apps I use the default launcher.

    Btw. you - or anyone really-, should feel free to improve the pattern launcher as you see fit, the documentation as well of course! I don't think I'll continue working on it, since I don't have too much time on my hands atm. You can also take the pattern recognition concept and put it to use somewhere else of course as well.

    I think the pattern launcher might become obsolete in the future though, @Gordon had some advanced gesture recognition technology in the pipeline I think? Which also allows you to start apps from the clock face. It was a stretch goal if I remember correctly.

  • Hi @crazysaem,

    thanks for the reply. I have enhanced the documentation to make this clearer. Even if this app might become obsolete in the forseeable future, it should be documented well so that it does not confuse or frustrate someone who wants to give it a try.

    You might want to have a look at my app loader. I have only made changes to the README.md. If I don't hear any objections from you, I will file a pull request for this doc change tomorrow.

    Regards,
    Dirk

  • That was quick! The updated documentation looks good to mešŸ‘ thank you. Yeah you can definitely do ahead and create a PR tomorrow.

  • Thanks for the feedback. Just issued the PR.

  • Hey quick question. The launcher seems to work very good on the default watchface, but it works unreliably on the LCARS clock. Has anyone tried this? Perhaps the LCARS swipe action that contolls the timer interfereces with the widget?

    Edit: I haven't tested the new version yet so let me get back on this.

  • @7kasper I haven't used the LCARS clock together with the pattern launcher, but looking at the code of the watchface I think you're right that the swipe action of the watchface will interfere with the launcher.

    I think the main reason it will interfere is that the espruino JS interpreter is NOT multithreaded. That means for example, if the watchface detected a swipe action and is then executing code that takes let's say a second to finish, the pattern launcher will not recognize any touch input for this entire second the watchface needed to redraw itself.

    I don't have any solution in mind that could fix this is issue, maybe someone else has an idea? If you want to use the pattern launcher reliably it's probably best to use a watchface that does not react to any touch input atm.

  • Maybe a Tab mode? Instead of swipeing the pattern which could trigger the watchface swipe you would tab the pattern.
    That should prevent the problem.

  • @PaddeK For this specific watch face your idea will not work unfortunately, since the watchface will directly start the launcher if it detects a tap, at least if I'm reading the code correctly:

    https://github.com/espruino/BangleApps/bĀ­lob/master/apps/lcars/lcars.app.js#L561

    Bangle.on("touch", e => {
      Bangle.showLauncher();
    });
    
  • Yep you are right.. haven't looked into the code. All ideas that come to mind now are dirty hacks.
    Like overwriting Bangle.on to watch for touch event listseners and only if no pattern is matched call the other listeners. But i am not sure if this is even allowed/possible with the API.

  • I guess you do:

    if (Bangle["#ontouch"]!==undefined) 
      Bangle.on("touch", e => {
        Bangle.showLauncher();
      });
    

    That's where touch handlers are defined, so calling that allows you to check to see if anything is currently using touch?

    ... And wrt the gestures - the code is already in there, I just haven't done a launcher using it yet. But even when I do I feel like there's something very clean about dragging in the 3x3 grid so it may be something people prefer anyway

  • I think patern launcher should take priority on the watchface. Only if no paterns are recognised should the event pass to the watchface. So perhaps we can force the drag/touch eventlistener of the widget to be on top of the listener array and cancel the event if a patern is recognised or something like that.

  • For the LCARS watch face I no more use swipe actions, instead I only use "tab" events (top, bottom, left, right) to ensure that it works well together with the pattern launcher (I'm also a huge fan of this cool and useful app).

    I hope I can increase the compatibility of LCARS with the BangleJs ecosystem in future further :)

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

The Pattern Launcher Rocks

Posted by Avatar for HughB @HughB

Actions