immich icon indicating copy to clipboard operation
immich copied to clipboard

feat(mobile): ios overnight upload

Open shenlong-tanwen opened this issue 10 months ago • 6 comments

Changes made in the PR

  • Adds a new Overnight Upload route specific to iOS devices
  • Enables Wakelock while overnight upload route is opened and backup is in progress and the wakelock is given up when the backup is completed or we leave the overnight upload route
  • The upload icon is moved around the screen in the overight upload route while the background upload is in progress to prevent screen burn

Screenshots

Overnight upload Backup Yet to Start Backup In-Progress
Icon Backup yet to start Backup In Progress

shenlong-tanwen avatar Mar 30 '24 14:03 shenlong-tanwen

Deploying immich with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1a6e85f
Status: ✅  Deploy successful!
Preview URL: https://91c76757.immich.pages.dev
Branch Preview URL: https://feat-mobile-ios-overnight.immich.pages.dev

View logs

Hello, thank you for the PR. I tested the PR on a physical device and saw a lot of flashing during the upload operation.

https://github.com/immich-app/immich/assets/27055614/016a5ac1-235c-4297-8710-8e2fd9e7a7dc

After spending more time thinking about this mechanism, since it will likely be a one-time process, we can have it enabled by default when the upload process runs on the foreground page, similar to your original implementation. What do you think?

alextran1502 avatar Apr 01 '24 04:04 alextran1502

It should still darken the screen after some time to avoid burn-in.

mertalev avatar Apr 02 '24 15:04 mertalev

After spending more time thinking about this mechanism, since it will likely be a one-time process, we can have it enabled by default when the upload process runs on the foreground page, similar to your original implementation. What do you think?

I still feel that preventing device sleep in one route is much better than preventing it across the app. Also, the screen switches to an all black background with only an upload button and stop backup button in the overnight screen to save battery. The flicker issue seems to be from the animatedswitcher. I've removed it for the time being. Seems to only reproduce in an iOS simulator and not on an android emulator.

shenlong-tanwen avatar Apr 06 '24 18:04 shenlong-tanwen

@shenlong-tanwen I did not mean to prevent sleep across the app, only when entering the backup page. Just not needing to create an additional route

alextran1502 avatar Apr 06 '24 18:04 alextran1502

@shenlong-tanwen I did not mean to prevent sleep across the app, only when entering the backup page. Just not needing to create an additional route

I've added a new iOS specific button called "Start Overnight Upload" which would trigger the overnight upload directly from the backup controller page

shenlong-tanwen avatar Apr 11 '24 16:04 shenlong-tanwen

Hi, is this still being worked on? If not I could try to continue/finish if that’s fine (with proper credit of course). This functionality would be really good for large uploads

Saschl avatar Aug 03 '24 20:08 Saschl

Superseded by #11621

bo0tzz avatar Aug 07 '24 09:08 bo0tzz