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

Live Activities on iOS #238

Open
needs-coffee opened this issue Aug 27, 2023 · 20 comments
Open

Live Activities on iOS #238

needs-coffee opened this issue Aug 27, 2023 · 20 comments
Labels
feature-request New feature or request
Milestone

Comments

@needs-coffee
Copy link

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 needs-coffee added the feature-request New feature or request label Aug 27, 2023
@Clon1998
Copy link
Owner

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
Copy link
Owner

Clon1998 commented Sep 8, 2023

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?

@jMaddrell
Copy link

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

@Ybalrid
Copy link

Ybalrid commented Sep 14, 2023

I'd love for this to be a feature!

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

@Clon1998
Copy link
Owner

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

@flexzuu
Copy link

flexzuu commented Oct 10, 2023

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.

@Clon1998
Copy link
Owner

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 Clon1998 added this to the 2.7.0 milestone Oct 12, 2023
@siyu6974
Copy link

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?

@Clon1998
Copy link
Owner

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.

@siyu6974
Copy link

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.

@Clon1998
Copy link
Owner

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
Copy link
Owner

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 2cc48b4

@ihrapsa
Copy link

ihrapsa commented Dec 16, 2023

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?

@Clon1998
Copy link
Owner

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.

@ihrapsa
Copy link

ihrapsa commented Dec 17, 2023

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?

@Clon1998
Copy link
Owner

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
Copy link
Owner

Clon1998 commented Dec 17, 2023

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
Copy link
Owner

Clon1998 commented Dec 17, 2023

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!

@ihrapsa
Copy link

ihrapsa commented Dec 17, 2023

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! 🙂

@kennydataml
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants