corona-warn-app / cwa-wishlist

Central repository to collect community feature requests and improvements. The CWA development ends on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
105 stars 14 forks source link

iOS 14 CWA Widget #26

Open Luca1719 opened 4 years ago

Luca1719 commented 4 years ago

Feature description

In case the Covid-19-pandemic will still be around in fall (what is likely) and the app is still in use, the app should gain the new iOS 14 Home Screen Widget feature. The widget would refresh in a specific cycle (like every hour) to display the current users risk. Also the widget should display, if the users preferences (Bluetooth, WiFi and cellular) are enabled, for the app to work.

Problem and motivation

This would be first a very good feature change and also very practical, because the user does not have to remind himself to open the app frequently.

Is this something you're interested in working on

Depends of if the CWA-Team has abilities in SwiftUI


Internal Tracking ID: EXPOSUREAPP-2160 obsolete Internal Tracking ID: EXPOSUREAPP-2183 new ticket

jonahschueller commented 4 years ago
tens0rfl0w commented 4 years ago

Hey, I just finished a first draft of an implementation of this extension (while looking at @Bohne9 /s concept):

You can track the feature branch here, but I will also open a WIP PR in the next days once the data source is connected! :)

$https://github.com/tens0rfl0w/cwa-app-ios/tree/feature/ios14-widget

Luca1719 commented 4 years ago

Great work. But I would remove the dividers, on this small space they are unnecessary and don’t look that good. Instead of the simple icon for how many days saved you could use the gauge images.

Luca1719 commented 4 years ago

I would also add a medium sized widget that either tells more information or show, what preferences the user has to toggle (Enable Bluetooth, enable Cellular).

tens0rfl0w commented 4 years ago

@Luca1719 Agreeing with you on the dividers, I will remove them or rework that. The icon of the active days section is already interactive, it will count up till day 13, and on day 14 it switches to the checkmark icon. (Like in-app) :)

I will definitely add more sizes to the widget, but sadly as of right now, the private iOS 14 frameworks have still some internal runtime errors, so working with them is really painful, I will look into this after Beta 2 is out. iOS 14 runs great, but this year Xcode got the bugs :) Next step is getting App groups to work to exchange dynamic store data.

tens0rfl0w commented 4 years ago

A little update: The basic functionality is done, but to access the database an app group needs to be established. Furthermore we need a framework to handle the connection to the database, any other implementation would make no sense. So this is a big barrier right now, but a framework is already work in progress👍🏽

Ein-Tim commented 4 years ago

@SonaliDK Can we get an update about this Issue (more recent now because iOS 14 was officially released)


My opinion: On the one hand it would be very useful for the user because (looking at the drafts from @Bohne9 and @tens0rfl0w) he/she could see from the home screen if the CWA has done an update in the Background. On the other hand I think the position from the RKI will be very clear: Data Protection! Everybody can see that you've Corona-Warn installed and even if you had (Risk) Exposures.

tens0rfl0w commented 4 years ago

As @Ein-Tim brought this idea up again, a little input from the technical site: Beside that the widget would give a better informational view on the current risk status, there are some technical conditions we need to address before we can implement such feature. First, we need a complete CWA framework that opens up an interface for the App extension (Widget) to access the database directly. I remember that there was a PR some time ago, that contained a first implementation of such framework, but this was WIP and got closed some months ago. Secondly, we need to establish an App Group environment that contains the database, so both instances in the container (App itself and widget extension) can access all needed data.

Thinking abstract, implementing such widget would open up new ways for better key fetch cycling, because widget tasks do get more CPU time than background tasks and will run more reliable than any scheduled BG task ever could. (since iOS 14)

Blackjacx commented 3 years ago

@SonaliDK Can we get an update about this Issue (more recent now because iOS 14 was officially released)

My opinion: On the one hand it would be very useful for the user because (looking at the drafts from @Bohne9 and @tens0rfl0w) he/she could see from the home screen if the CWA has done an update in the Background. On the other hand I think the position from the RKI will be very clear: Data Protection! Everybody can see that you've Corona-Warn installed and even if you had (Risk) Exposures.

Regarding the data protection issue. Offering the functionality of the widget is one thing which does not violate any form of data protection issue. Each user can then decide for themself if using the widget:

If you pull this data protection card then we also need to warn user from using the app in public because almost the whole screen is red on high risk 😅

dsarkar commented 3 years ago

Internal Tracking ID: EXPOSUREAPP-2160 obsolete Internal Tracking ID: EXPOSUREAPP-2183 new ticket