1

In a Phonegap Javascript app I close the Android Version of this app with navigator.app.exitApp();

As we know, closing apps is not allowed in iOS. But the iPad User can minimize the app into the background e.g. by swiping.

Two questions:

  1. Is it possible that I could minimize the app programmatically?

  2. Is there an event when the user minimizes the app?

baldrs
  • 2,132
  • 25
  • 34
Oblomow
  • 51
  • 1
  • 8

1 Answers1

1

This concerns your point Nr 2: When the App is minimized, i.e. put to the background, the "pause" Event is fired and can be handled. See details in the documentation: http://docs.phonegap.com/en/2.2.0/cordova_events_events.md.html#pause

[UPDATE]: This concerns Nr.1: you could write a phonegap plugin that let's you call another intent, i.e. the Home Screen, which would automatically put your app into background, without terminating it. See also Pause an Android App with Phonegap

Community
  • 1
  • 1
bouscher
  • 1,300
  • 1
  • 9
  • 18