Forum

Ralf
Participant
    5 years, 9 months ago #19467
    Up
    0
    Down
    ::
    document.addEventListener("backbutton", onBackKeyDown, false);
    function onBackKeyDown() {
    
    // Handle the back button
    //alert('Back Button is Pressed!');
    
    if ("{actual Screen}"=== "Main")
    {
    console.info('close pressed');
    // Backbutton -> close App
    }
    else
    {
    console.info('back pressed');
    // NavTo history.back or backtoMain
    
    }
    
    }

    This works, but i don´t know how to handle the if-command and Backbutton in SAPUI…

    Need help how i ask for actual Screen and the commands how i go history (window) back and close app