Skip to content

Events are not firing on Samsung S23 Android 14 device #30

Open

Description

@sonisumit686

I am using this useful package in one of my applications, working fine on range of devices though no events are getting fired on Samsung S23 devices (S23 max too) with Android 14 OSv.
None is getting triggered, user inactivity or app focus.

The current implementation is having 4 mins of timeout trigger and targeted for Android and iOS.
Checked on device OS level optimisations and power saving mode too but nothing down to that level is causing it.

One weird thing I noticed too, once we enable the logs (Flutter logs) or run a debug variant of build on same code base, it is triggering events, I can confirm there are no additional steps performed in release/signing stages other than ripping out the debug info.
Any ideas on it would be helpful to get myself unblocked.

Activity

  1. SankethBK commented on Feb 20, 2024

    @SankethBK
    Owner

    Hi @sonisumit686 I always wondered about this issue while developing this package but never faced it. I guess power saving mode is more stricter in some devices than other, ref.

    One weird thing I noticed too, once we enable the logs (Flutter logs) or run a debug variant of build on same code base, it is triggering events, I can confirm there are no additional steps performed in release/signing stages other than ripping out the debug info.

    My guess is a timer is not sufficient to prevent the device from hibernating the process, so i think when you enabled logs, a much heavier operation is being performed continuously which cannot be stopped by OS. We can use background tasks for better results, but I am not sure if it would be 100% reliable. Currently I can't think of anything else, I will update if I get anything.

  2. sonisumit686 commented on Feb 21, 2024

    @sonisumit686
    Author

    Thanks much for getting back @SankethBK, I will too keep an eye on it and update here if come across any workaround or solutions.

  3. SankethBK commented on Jun 1, 2024

    @SankethBK
    Owner

    Hi, i've fixed this issue in latest release 3.0.0. I have removed the timer completely which has risk of getting terminated from OS, instead storing the timestamp when app is pushed to the background and calculating the time difference when app regains focus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions