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

[Android] BackToForeground when app is killed. #223

Merged
merged 2 commits into from
Jun 23, 2020

Conversation

manuquentin
Copy link
Contributor

@manuquentin manuquentin commented Jun 19, 2020

When calling backToForeground method, we can have a NullPointerException Attempt to invoke virtual method 'void android.app.Activity.startActivity(android.content.Intent)' on a null object reference when the app is killed.

It's because the activity doesn't exist when the application is in headless mode.

This PR fixes this issue by launching the app when the activity doesn't exists.

@manuquentin manuquentin force-pushed the back_to_foreground_killed branch 2 times, most recently from aede4f2 to c22688c Compare June 19, 2020 21:43
@manuquentin manuquentin force-pushed the back_to_foreground_killed branch from c22688c to 1e8987a Compare June 19, 2020 21:45
@manuquentin manuquentin merged commit bedfc23 into master Jun 23, 2020
@manuquentin manuquentin deleted the back_to_foreground_killed branch June 23, 2020 14:45
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.

1 participant