Handle the event when the app is brought back from background

Thread is closed for posting
2 posts, 0 answers
  1. Andrzej
    Andrzej avatar
    1 posts
    Member since:
    Feb 2015

    Posted 13 Jul 2015 Link to this post


    My app allows the use to drag and drop rows of a table. If the app is suspended when the user is dragging a row (phone call etc), I need to be able to reset the dragging when the user gets back to the app. Otherwise, the dragging mechanism gets screwed up because it never registers the end touch event.

    Is there anyway to do this?

  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 16 Jul 2015 Link to this post

    Hi Andrzej,

    If you are building a hybrid application in AppBuilder, then you should be able to use Cordova's resume event to track when the app is retrieved from the background:
    document.addEventListener("resume", function(){
      //your custom logic
    }, false);

    If that is not what you are looking for, please elaborate on your scenario a bit more and I will suggest more to-the-point solutions.

    Tina Stancheva

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

Back to Top