I'm trying to make my app available vor the Vivo 3. I recognize a strange behaviour: When a user press the enter button on the Vivo, the
function onKey(key)
seem to occur, but the app menu opens too...
Here is, what I do within the onKey function for the enter button:
if (key.getKey() == Ui.KEY_ENTER) {
if (warmup == 0 and App.getApp().getWarmupProp()){
alertWarm();
m_gametimeCount = -1;
if( Toybox has :ActivityRecording ) { //Beginn first half
if( ( session == null ) || ( session.isRecording() == false ) ) {
if (App.getApp().getSaveAsProp().equals("RUNNING")) {
session = Record.createSession({:name=>"Run", :sport=>Record.SPORT_RUNNING});
session.start();
} else if (App.getApp().getSaveAsProp().equals("GENERIC")) {
session = Record.createSession({:name=>"Generic", :sport=>Record.SPORT_GENERIC});
session.start();
}
}
}
warmup += 1;
} else if (warmup == 1 and App.getApp().getWarmupProp()){
alertWarm();
session.stop();
session.save();
session = null;
warmup +=1;
m_gametimeCount = 0;
} else {
startStop();
}
}
Is this a bug or a feature?
Kind regards
Andy