Handle back button of android phone

2 posts, 0 answers
  1. Aman
    Aman avatar
    3 posts
    Member since:
    Jan 2014

    Posted 24 Mar 2014 Link to this post

    Hi,
    I have some code which i want should execute when the back button on mobile phone is pressed.
    How to achieve the same?

    Regards,
    Aman
  2. Pavel Kolev
    Admin
    Pavel Kolev avatar
    26 posts

    Posted 24 Mar 2014 Link to this post

    Hello Aman,

    You can use the following event listener to track the usage of the back button:

    document.addEventListener("backbutton", onBackKeyDown, false);


    Regards,
    Pavel Kolev
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET. Seats are limited.

     
Back to Top