Skip to Content

How to handle Device Back Button in SAP Mobile application (HCPms).....in Android Platform

Hi

I am currently working on SAP mobile app development. i have one shell bar back button which i can handle and i can put any methods over there ..But i want to do same thing in Android device specific Button too...

please help here :)

Regards

Virendra Soni

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 25, 2017 at 05:10 AM
            function onLoad() {
                document.addEventListener("deviceready", onDeviceReady, false);
            }
            function onDeviceReady() {
                document.addEventListener("backbutton", onBackKeyDown, false);
            }
            function onBackKeyDown() {
                alert("You Can Call Me MR.");
            }
    
    // you can use this code to handle the device back button.. 
    // call the onLoad() function in your view section. 
    // :) Thanks..
    Add comment
    10|10000 characters needed characters exceeded