I would like to disable the back button in my application on the Vivoactive HR and searched and cannot find the answer.
I just want the backlight to come on when pressing the back button which seems to work in the simulator.
I am hoping this thread will help some newbie like me in the future as well. :cool:
This is my code thus far .. and looks like that would go in the KEY_DOWN_LEFT.
function onKey(evt)
{
if(evt.getKey()==Ui.KEY_ENTER || evt.getKey()==Ui.KEY_START) // START - RIGHT KEY
{
if (( session != null ) && session.isRecording() )
{
session.stop();
Att.backlight(true);
Ui.pushView(new Rez.Menus.MainMenu(), new PodMenuDelegate(), Ui.SLIDE_UP);
}
else
{
Att.backlight(true);
Ui.pushView(new Rez.Menus.WorkMenu(), new PodMenuDelegate(), Ui.SLIDE_UP);
}
}
if (evt.getKey() == Ui.KEY_DOWN_LEFT) // BACK - LEFT KEY
{
Att.vibrate(vibrateDataShort);
Att.backlight(true);
}
}