Handle back button of android phone

Thread is closed for posting
2 posts, 0 answers
  1. Aman
    Aman avatar
    3 posts
    Member since:
    Jan 2014

    Posted 24 Mar 2014 Link to this post

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

  2. Pavel Kolev
    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);

    Pavel Kolev

    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