thudugala / thudugala/Plugin.LocalNotification

[Bug] Strange app lifecycle when resuming app from lock screen notification

Open
#146 22 comments 0 reactions 1 assignee View on GitHub

@thudugala is already working on this.

Since Mar 2, 2021.

Android
Dominant language
C#
Stars
474
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

On Android, when resuming an app by tapping on a local notification from the lock screen, the app resumes, then goes to sleep, then resumes again.

Is this an android bug, a xamarin forms bug, or a bug in the localnotification plugin ?

To Reproduce

Steps to reproduce the behavior:

  1. Open the sample app and tap on "send local notification"
  2. Turn the phone off and on again
  3. From the lock screen, tap on the sample app notification in order to resume the app (should require double tap and unlock)
  4. The app resumes, however it also immediately goes to sleep and resumes again (app.xaml.cs onResume and onSleep)

Expected behavior

The app should simply resume. No resume-sleep-resume strange cycle.

Platform:

  • Android (api 30)
  • Device: android emulator ; pixel 5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.