Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9276633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:54:05+00:00 2026-06-18T16:54:05+00:00

I am developing a mobile app for iOS and when testing it in my

  • 0

I am developing a mobile app for iOS and when testing it in my device I get that once I terminate it (with the red button after double click on home and long touch) and then open it again, it is still in the state it was when I decided to terminate it.

So my question is:

Can I refresh my app with javascript when it opens after termination? Which is the event I need to look for?

EDIT:
If I use the structure below, I get the PAUSE event to work but not the RESUME one…Why?

var app = {

    ready: false,

    initialize: function() {
        this.bind();
    },

    bind: function() {
        document.addEventListener('deviceready', this.deviceready, false);
    },

    deviceready: function() {
        app.report('deviceready');
        document.addEventListener("pause", onPause, false);
        document.addEventListener("resume", onResume, false);
    },

    report: function(id) { 
        console.log("report:" + id);
    }
};

function onPause() {
  console.log("I've been paused");
}

function onResume() {
  console.log("I've been resumed");
}

EDIT 2: Ok I solved it. It looks like when your device is plugged to the computer the RESUME event does not fire because when KILLING the app Xcode stops tasks, which will make the app to freeze. Then when opening back, the app is messed up and unresponsive.
Thanks for your help.
The edit above should work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:54:06+00:00Added an answer on June 18, 2026 at 4:54 pm

    From what I can see in the PhoneGap documentation you may be able to use the resume event to refresh your app.

    For example:

    var refreshApp = function() {
        // Do what you need to do in order to refresh app here.
    };
    document.addEventListener("resume", refreshApp, false);
    

    Take a look at http://docs.phonegap.com/en/2.3.0/cordova_events_events.md.html#resume

    Note: I haven’t used PhoneGap and this isn’t tested by any means.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an app that uses push notifications, and testing on a device
I'm developing a mobile app that will be available on both android and ios.
i am currently developing an ios app that uses PayPal's Mobile Payment Library to
I'm currently in an early phase of developing a mobile app that depends heavily
I am developing a Windows Mobile app that my company is providing the devices
Im developing a mobile app in j2me.In that i send a https request to
I'm developing a native mobile app for Android and iOS using PhoneGap.I have a
I'm developing a mobile website in HTML/HTML5. This is NOT an iOS app but
I am developing a mobile app keeping in mind that I will be targeting
I am developing mobile web app. However, safari in iOS 5.1 or below has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.