mobileraker icon indicating copy to clipboard operation
mobileraker copied to clipboard

Live Activities on iOS

Open needs-coffee opened this issue 1 year ago • 20 comments

Feature Request

A request for live activities notifications on iOS similar to how octopod shows live printing data on the lock screen and similar to the android progress notification that was previously available in mobileraker.

There is a flutter package for live activities (https://pub.dev/packages/live_activities) however the issue i currently see is that the actual widget needs to be created in swift as a native iOS widget, not in dart.

I will try and get round to implementing this but wanted to leave this here as a feature request as it is something i miss from octopod.

needs-coffee avatar Aug 27 '23 17:08 needs-coffee

Hey, I am aware of that package. Small heads up: The main problem is getting the information from Firebase to this live activity. I'd assume it could work by injecting some logic into the MobilerakerNotificationServiceExtension. However, I still want to look into IOS/Swift myself.

Clon1998 avatar Aug 27 '23 17:08 Clon1998

Hey, I actually wanted to try out Swift and swiftUI so I figured that this might be a good start. My current UI looks like that image

Any input & feedback would be appreciated. Especially what kind of info might be handy to show in the live activity?

Clon1998 avatar Sep 08 '23 20:09 Clon1998

It’d be great if there was somewhere to show M117 messages.

jMaddrell avatar Sep 09 '23 17:09 jMaddrell

I'd love for this to be a feature!

The circular percentage indicator would also be right at home in the Dynamic Island... 👀

Ybalrid avatar Sep 14 '23 13:09 Ybalrid

First POC for the live activities is now included in v2.6.4

Clon1998 avatar Sep 30 '23 11:09 Clon1998

It would be really cool to allow using the widget that was created for the live activity also as normal widget. While no print is going on it could show some simple status msg instead.

flexzuu avatar Oct 10 '23 21:10 flexzuu

It would be really cool to allow using the widget that was created for the live activity also as normal widget. While no print is going on it could show some simple status msg instead.

There is a separate issue for that #141.

Clon1998 avatar Oct 10 '23 21:10 Clon1998

The ETA on the widget is not the same ETA within the app. It's more like a time remaining thing. Can we rename it?

siyu6974 avatar Nov 15 '23 06:11 siyu6974

The ETA on the widget is not the same ETA within the app. It's more like a time remaining thing. Can we rename it?

It depends. But you are right I should use the correct label.

It shows the eta if the print takes longer than 2.5hrs while it uses a timer if only 2.5hre are left.

Clon1998 avatar Nov 15 '23 08:11 Clon1998

It shows the eta if the print takes longer than 2.5hrs while it uses a timer if only 2.5hre are left.

Love it! I can make a PR to fix the label if you like / don't have the time.

siyu6974 avatar Nov 15 '23 08:11 siyu6974

It shows the eta if the print takes longer than 2.5hrs while it uses a timer if only 2.5hre are left.

Love it! I can make a PR to fix the label if you like / don't have the time.

Feel free 😉 I think I already included the remaining label/translation and therefore, only a small change in swift is required.

Clon1998 avatar Nov 15 '23 09:11 Clon1998

It shows the eta if the print takes longer than 2.5hrs while it uses a timer if only 2.5hre are left.

Love it! I can make a PR to fix the label if you like / don't have the time.

Added in 2cc48b4982460cef20663a00c4ed1b8b88387c53

Clon1998 avatar Nov 15 '23 17:11 Clon1998

I really like this feature, however it feels a bit text crowded. I recently stumbled upon Joint Craft App and I really like how they did it:

App Joint Mobileraker

Would be nice to:

  • either limit the height of the banner or reorder/resize text elements,
  • have an stl preview
  • have a progress bar instead of the progress wheel (only graphic element that feels way too small)
  • make the banner follow the system appearance or manual toggle (Dark/Light mode)

What do you think?

ihrapsa avatar Dec 16 '23 22:12 ihrapsa

I really like this feature, however it feels a bit text crowded. I recently stumbled upon Joint Craft App and I really like how they did it:

App Joint Mobileraker Would be nice to:

  • either limit the height of the banner or reorder/resize text elements,
  • have an stl preview
  • have a progress bar instead of the progress wheel (only graphic element that feels way too small)
  • make the banner follow the system appearance or manual toggle (Dark/Light mode)

What do you think?

I actually really like their design. However, I am sure they could be a bit upset if I copied it 1:1. However, I agree that I still need to work a bit on the activities, especially the background stuff should be a rather fast fix. Also, their design might not work as well with mobileraker since I currently have no way to share the STL/Preview to the Platform, and I also need to incorporate the machine name due to multi-printer support.

Clon1998 avatar Dec 16 '23 23:12 Clon1998

For sure, we don’t have to copy their design. I can come up with a poc visual if needed and go from there. What limits the sharing of the STL/preview to the Platform?

ihrapsa avatar Dec 17 '23 00:12 ihrapsa

For sure, we don’t have to copy their design. I can come up with a poc visual if needed and go from there. What limits the sharing of the STL/preview to the Platform?

I thought the lib I am using currently does not support it. However, it seems like I am wrong, and it actually does (Well, we would still need to download the stl image onto the device since using a URL is not safe due to proxy setups with custom headers and certificates).

Also, images can look bad because it depends on the slicer if 1. a preview is available and 2. the preview is using a transparent/nearly transparent background.

Clon1998 avatar Dec 17 '23 00:12 Clon1998

image

As of now, I went back to the drawing board and defaulted to a black background, switched to a linear progress bar and made it more compact.

Clon1998 avatar Dec 17 '23 00:12 Clon1998

Bildschirmfoto 2023-12-17 um 02 38 33 Bildschirmfoto 2023-12-17 um 02 38 42

I think using this layout is a bit cleaner and provides the most important information right at the top. It will switch between the ETA and Timer depending on the remaining time (3 hours for now).

I am open for feedback and suggestions!

Clon1998 avatar Dec 17 '23 01:12 Clon1998

I really like what you did. This looks way cleaner and pleasant to the eye.

Regarding the STL preview, I see the app is able to preview them in Files tab. Aren't those locally downloaded? I think we can also use base64. As long as the size is below 4KB ActivityKit should allow that. For gcode files with no preview a placeholder image or the mobileraker icon could be used instead.

I'm happy for now with what you did so thank you and good job! 🙂

ihrapsa avatar Dec 17 '23 15:12 ihrapsa

This feature was working for me up until 2 days ago when I restarted my phone. I have no idea what happened. Live activities is enabled in both app settings and iPhone settings.

kennydataml avatar Jan 08 '24 14:01 kennydataml