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

Example with notifee foreground notification to keep the app alive in background #2245

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dprevost-LMI
Copy link

@dprevost-LMI dprevost-LMI commented Nov 23, 2023

Thanks for submitting a PR! Please read these instructions carefully:

  • Explain the motivation for making this change.
  • Provide a test plan demonstrating that the code is solid.
  • Match the code formatting of the rest of the codebase.
  • Target the main branch, NOT a "stable" branch.

Motivation (required)

I enhanced the example project to give a complete, working example of the Notifee foreground service, keeping the app alive in the background when taking a picture or video with the camera.

What existing problem does the pull request solve?
Solve the problem where the app is killed in the background while using the camera, and when exiting the camera, your app gets restarted and lands on the home page.

Test Plan (required)

Using the simulator on different Android versions, I validated that we were seeing the foreground notification.
This is also where I found that Android 8 and 9 required camera permission, even if it was not in the manifest. , So I provide another example of requesting camera permission.

Screenshot 2023-11-22 at 10 42 48 PM Screenshot 2023-11-22 at 10 42 56 PM Screenshot 2023-11-22 at 10 43 21 PM Screenshot 2023-11-22 at 10 43 44 PM

@dprevost-LMI dprevost-LMI changed the title Example with camera permission and foreground notification Example with foreground notification (and camera permission request) Nov 23, 2023
@dprevost-LMI dprevost-LMI changed the title Example with foreground notification (and camera permission request) Example with notifee foreground notification to keep the app alive in background Nov 23, 2023
@dprevost-LMI
Copy link
Author

dprevost-LMI commented May 7, 2024

@gabrieldonadel or @cipolleschi, you seem to commit often. Does the above add value for this project else I will just close it

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.

None yet

1 participant