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

Background Service stuck headless when swiping app away #304

Merged
merged 1 commit into from
Jan 9, 2018

Conversation

dimitriscsd
Copy link
Contributor

As explained in #298 and #261 on some devices the plugin's service would not die if you swiped away the app from the recents screen on Android.

This resulted in periodic logcat errors and problems when you started the app back up again. In my case, i could not re-connect to a BLE device as the connection was still on from the previous run.

This patch seems to fix those problems as it basically does a "force stop" when the app gets swiped away, closing the service as well as everything else.

Copy link

@zookz zookz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirm this is working

@katzer katzer merged commit a2352f5 into katzer:master Jan 9, 2018
@katzer
Copy link
Owner

katzer commented Jan 9, 2018

Thanks

leonardo-fernandes added a commit to leonardo-fernandes/cordova-plugin-background-mode that referenced this pull request Jul 7, 2020
When opening a deep link this plugin is loaded twice on the same process, so we cannot kill the app when destroying the first plugin.

This line was first added by katzer#304
However the issue this was intended to solve was likely fixed by removing the launchMode singleInstance (already merged), as explained in here: katzer#261 (comment)
raylin01 pushed a commit to truckxinc/cordova-plugin-background-mode that referenced this pull request Jun 7, 2021
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.

3 participants