Skip to Content
1
Oct 13, 2013 at 10:55 AM

SAPUI5 Native Back-Button

1149 Views

have a sapui5 mobile application which runs perfectly. The android device has a back button. What I want to achieve is that when you press the button the app should navigate back. In the sapui5 mobile api it is possible with this coding:

app.back();

The question now is how I can make this? The activity of my android application has the following method:

@Override

public boolean onKeyDown(int keyCode, KeyEvent event) {

if ((keyCode == KeyEvent.KEYCODE_BACK)) {

//Here you should navigate one view back

}

return super.onKeyDown(keyCode, event);

}

Is it possible to call from my activity the app variable in javascript and then tell my application to navigate back?

Greetings Stef