Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added moveToBackground and moveToForeground #1181

Merged
merged 1 commit into from
Mar 13, 2017

Conversation

gujiman
Copy link
Contributor

@gujiman gujiman commented Mar 13, 2017

feat(background-mode): add missing functions moveToBackground and moveToForeground as explained in #1180

Please can you add the following 2 functions into background mode:

cordova.plugins.backgroundMode.moveToBackground();
// or
cordova.plugins.backgroundMode.moveToForeground();
Found here:
https://github.com/katzer/cordova-plugin-background-mode#transit-between-application-states

The reason being is that overrideBackButton (https://github.com/driftyco/ionic-native/blob/master/src/plugins/backgroundmode.ts#L133) works really badly for opened nav pages. Instead of going back to the root it closes the App. However moveToBackground works perfectly when required without interfering with the hardware back button.

feat(background-mode): add missing functions moveToBackground and moveToForeground as explained in danielsogl#1180
@ihadeed ihadeed merged commit 95ac7e1 into danielsogl:master Mar 13, 2017
@ihadeed
Copy link
Collaborator

ihadeed commented Mar 13, 2017

thanks

@gujiman gujiman deleted the patch-1 branch March 13, 2017 21:38
@gujiman gujiman restored the patch-1 branch March 13, 2017 21:38
@gujiman gujiman deleted the patch-1 branch March 13, 2017 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants