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

Add wakelock to prevent cancelling downloads #215

Merged
merged 1 commit into from
Jan 19, 2023
Merged

Conversation

donpui
Copy link
Contributor

@donpui donpui commented Jan 2, 2023

Added wakelock plugin, which prevents screen timeout during the transfer or while waiting to enter code.

Wake lock is enabled only when code is generated or entered and disabled when done or error cases.

This was added, after I jumped on issue, when on iOS device, transfers gets cancelled, after phone screens turn off, which by default 30sec - 1 min. This prevents bigger files sending (or when you have slow network) and you have manually set always on screen in order to send something.

I have not seen issue on Android phone, however there are many version of Android phone manufactures, I guess this can also be issue for Android too in some cases. Not sure if we need this for Desktop version as during testing, I have not jumped on such issues.

Manually tested with iOS and Android.

Code Review Checklist

  • Description accurately reflects what changes are being made.
  • Description explains why the changes are being made (or references an issue containing one).
  • The PR appropriately sized.
  • New code has enough tests.
  • New code has enough documentation to answer "how do I use it?" and "what does it do?".
  • Existing documentation is up-to-date, if impacted.

@donpui donpui requested a review from ewanas January 2, 2023 10:24
Copy link
Contributor

@ewanas ewanas left a comment

Choose a reason for hiding this comment

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

LGTM

@donpui donpui merged commit c2a1fee into ios-build Jan 19, 2023
@donpui donpui deleted the ios-build-wake-on branch January 19, 2023 12:42
donpui added a commit that referenced this pull request Jan 19, 2023
* Adding iOS build changes to experment

* Some changes

* Update lock

* Update experments

* Experments

* Progress

* Adjusted to iOS screens

* Fixing Download, Select File functions, adding icon

* Added select media for iOS

* Cleanup on IPA validation

* Cleanup and adding stage

* Small double button fix and documentation

* Small fixes for button and file selector

* Add push capabilities

* Update flutter-intro-slider to newest commit

* Added resource and debug label parameter

* Update submodules and lock files

* Editable config (#209)

* editable config

* do not use inherited preference class

* expand defaults for transit relay

* add cancel button and update dart_wormhole_william

* improve styling

* fix formatting

* combine header with value and edit button.

* Derive themes and use editable fields for desktop

* remove Fimber logging

* fix declaration of dark theme

* cleanup

* Improve prefs editor layout

* Do not update preference when choosing default value

* add widget test

* also test multiple defaults

* formatting

* Fix Version for Targets which do not define versionCode

* format

* add configurable validation

* Allow ws scheme

* add test for Version

* format

* add generated mocks file

* cleanup

* fix preference text overflow

* update dart module

* fix not handling Uri parsing exceptions

* trim input strings

Co-authored-by: Donatas Puidokas <104410044+donpui@users.noreply.github.com>

* Stage_la updated

* Fix small mixtakes after merge

* Added notes regarding ios and some typos fix

* Ios build improvements (#219)

* TEMP iOS build improvements

* Saving working changes for iphonesimulator

* Cleanup

* Cleanup and added documentation

* TEMP

* Plugin update

* Adding simple CI build for iOS

* Adding CI build for iOS

* Update plugin

* fixup! Merge remote-tracking branch 'origin/main' into ios-build-improvements

* fixup! Update plugin

* iOS lockfile updates

* Update plugin

Co-authored-by: El-Hassan Wanas <wanas@leastauthority.com>

* Update submodule

* Revert "Update dart submodule"

This reverts commit 76982bdd7d86bd981c99895b692586cd12198c15.

* Update submodule

* Update version to 1.0.3

* Fix styling issue

* Add wakelock to keep screen on (#215)

* Fix static error after update branch

Co-authored-by: Andreas Würl <andi@tryb.de>
Co-authored-by: El-Hassan Wanas <wanas@leastauthority.com>
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.

2 participants