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

Added support for all lifecycle events on iOS and Android #3

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

bartonip
Copy link

@bartonip bartonip commented Nov 2, 2021

I've added support for all lifecycle events on iOS and Android and the plugin is sending up the exact lifecycle transition from each platform in case granular control of events by platform is required.

@ajinasokan
Copy link
Owner

Could you tell me what is the use case of these additional events?

Also this will be a breaking change since PR seem to remove the existing foreground and background events. That is undesirable. The best I can think of is an additional getter platformEvents that streams all these.

Copy link

@yasinarik yasinarik left a comment

Choose a reason for hiding this comment

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

Actually, this PR should be accepted since it gives an extended detection of the app lifecycle. It solves the issue a have opened: #6. Until the merge, I have to use the package pointing the forked repo of @bartonip.

There are plenty of use cases for catching these additional lifecycle states. For example:

-in a finance application: to prevent exposing any sensitive information),
-a timer based trivia game: to prevent users to send the game to background or app switcher.

Apart from that, yes, even though it is more comprehensive, the new enum naming is different in this PR that causes a breaking change.

@Hwan-seok
Copy link

Hwan-seok commented Aug 22, 2022

This is great but seems android's onStart does not map to anything so it is reported as unknown.
According to the following lifecycle image, it might be reported as willEnterForeground
image

@ajinasokan
Copy link
Owner

This PR is now almost 10 months old 🥲

Since I want to make this change non breaking, I will fork this PR and add these events into a different stream and a different factory constructor on the Widget to use these.

@bartonip bartonip force-pushed the master branch 3 times, most recently from 96bdb38 to 29ee7fe Compare August 24, 2023 05:00
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

5 participants