Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-1260

Support exit-on-suspend config.xml preference on Cordova Android

    XMLWordPrintableJSON

Details

    Description

      I'd like to see the exit-on-suspend preference that is currently supported by IOS get supported by Android. Here's how I naively see it happening:

      Config.xml:

      <preference name="exit-on-suspend" value="true" />
      

      MainActivity.java:

      @Override
      onStop() {
          super.onStop();
          if (config.getPref("exit-on-suspend") == true) {
          	finish()
          }
      }
      

      I'm assuming it would be a matter of:

      • adding the above snippet to the main android activity template in PG
      • possibly adding support for exit-on-suspend to the class that loads the config

      Attachments

        Activity

          People

            bowserj Joey Robert Bowser
            wildabeast Ryan Willoughby
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: