It's possible this is intentional, or can be overwritten by defining a custom Behavior but I did not see that documented to wanted to flag this.
When instantiating an instance of Piu's Application class, this captures the back button and seemingly overrides custom behaviour I'm trying to add using the Button class. Here is the simplest form of replicating this, using the hellubutton example code to capture button presses:
import {} from "piu/MC";
import Button from "pebble/button"
console.log("hello, button - press a button");
console.log(" press and hold back to exit");
new Button({
types: ["select", "up", "down", "back"],
onPush(down, type) {
console.log(`${down ? "press" : "release"} ${type}`);
}
});
export default new Application();
My application renders a menu and it would feel intuitive to allow the user to "back" out of it, but in the current form a press of the back button closes the application completely.
I'm aware the button mechanism received some attention as part of #12 so this may be relevant here as well.
It's possible this is intentional, or can be overwritten by defining a custom
Behaviorbut I did not see that documented to wanted to flag this.When instantiating an instance of Piu's
Applicationclass, this captures the back button and seemingly overrides custom behaviour I'm trying to add using theButtonclass. Here is the simplest form of replicating this, using thehellubuttonexample code to capture button presses:My application renders a menu and it would feel intuitive to allow the user to "back" out of it, but in the current form a press of the back button closes the application completely.
I'm aware the button mechanism received some attention as part of #12 so this may be relevant here as well.