You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Ryan Willoughby (JIRA)" <ji...@apache.org> on 2012/08/18 00:04:37 UTC
[jira] [Created] (CB-1260) Support exit-on-suspend config.xml
preference on Cordova Android
Ryan Willoughby created CB-1260:
-----------------------------------
Summary: Support exit-on-suspend config.xml preference on Cordova Android
Key: CB-1260
URL: https://issues.apache.org/jira/browse/CB-1260
Project: Apache Cordova
Issue Type: New Feature
Components: Android
Reporter: Ryan Willoughby
Assignee: Joe Bowser
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:
{code}
<preference name="exit-on-suspend" value="true" />
{code}
MainActivity.java:
{code}
@Override
onStop() {
super.onStop();
if (config.getPref("exit-on-suspend") == true) {
finish()
}
}
{code}
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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CB-1260) Support exit-on-suspend config.xml
preference on Cordova Android
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joe Bowser updated CB-1260:
---------------------------
Fix Version/s: 2.4.0
> Support exit-on-suspend config.xml preference on Cordova Android
> ----------------------------------------------------------------
>
> Key: CB-1260
> URL: https://issues.apache.org/jira/browse/CB-1260
> Project: Apache Cordova
> Issue Type: New Feature
> Components: Android
> Reporter: Ryan Willoughby
> Assignee: Joe Bowser
> Labels: android, background, exit-on-suspend, onStop
> Fix For: 2.4.0
>
>
> 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:
> {code}
> <preference name="exit-on-suspend" value="true" />
> {code}
> MainActivity.java:
> {code}
> @Override
> onStop() {
> super.onStop();
> if (config.getPref("exit-on-suspend") == true) {
> finish()
> }
> }
> {code}
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-1260) Support exit-on-suspend config.xml
preference on Cordova Android
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437125#comment-13437125 ]
Joe Bowser commented on CB-1260:
--------------------------------
Unfortunately, after adding the code mentioned, there's issues with PhoneGap re-initalizing. It doesn't appear that onStop is the right place to do this. It would probably make sense to do it earlier, either that or to wait for the change to the bridge so that we don't have issues with the server stopping and restarting.
> Support exit-on-suspend config.xml preference on Cordova Android
> ----------------------------------------------------------------
>
> Key: CB-1260
> URL: https://issues.apache.org/jira/browse/CB-1260
> Project: Apache Cordova
> Issue Type: New Feature
> Components: Android
> Reporter: Ryan Willoughby
> Assignee: Joe Bowser
> Labels: android, background, exit-on-suspend, onStop
>
> 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:
> {code}
> <preference name="exit-on-suspend" value="true" />
> {code}
> MainActivity.java:
> {code}
> @Override
> onStop() {
> super.onStop();
> if (config.getPref("exit-on-suspend") == true) {
> finish()
> }
> }
> {code}
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira