-
Notifications
You must be signed in to change notification settings - Fork 619
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
[screen_state] iOS support and renewal of the native example apps #901
Open
luansilva-tokenlab
wants to merge
12
commits into
cph-cachet:master
Choose a base branch
from
luansilva-tokenlab:screen-state-ios
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[screen_state] iOS support and renewal of the native example apps #901
luansilva-tokenlab
wants to merge
12
commits into
cph-cachet:master
from
luansilva-tokenlab:screen-state-ios
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Utilizing the 'isProtectedDataAvailable' principle to assess if the screen is locked, alongside brightness analysis to validate if the screen is turned off.
Added locked state to manage the iOS unlocked state
Added 'version' parameter and cleaned up comments in the file.
Changed app name, version, etc...
Timer removal for better compatibility with background tasks
This looks indeed interesting. I will take a look later. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I introduced iOS support to the 'screen_state' package by leveraging the 'isProtectedDataAvailable' and 'brightness' parameters for screen state analysis. Additionally, I refined the base plugin to facilitate its utilization in iOS applications, and optimized code readability and data handling with enhanced enums.
Moreover, I updated the native example apps using Flutter 3.16.9 as the foundation, addressing their outdated status and ensuring compatibility with iOS.
Despite these advancements, I encountered limitations inherent to the iOS platform. Notably, the 'isProtectedDataAvailable' parameter only provides data if the user has any form of password protection enabled, rendering it ineffective for detecting unlocks on devices without a password. Furthermore, the iOS simulator's inability to replicate device locking behavior and its distinct brightness controls hampered event detection within the simulator environment.
Throughout development, I conducted testing on an iPhone 6+ running iOS 12.5.7, successfully capturing all relevant events.