Feature: Home Widgets in UAC for Add Alarm (1x1) and Next Alarm (4x2) in Android#834
Open
Gaurav-Kushwaha-1225 wants to merge 9 commits intoCCExtractor:mainfrom
Open
Feature: Home Widgets in UAC for Add Alarm (1x1) and Next Alarm (4x2) in Android#834Gaurav-Kushwaha-1225 wants to merge 9 commits intoCCExtractor:mainfrom
Gaurav-Kushwaha-1225 wants to merge 9 commits intoCCExtractor:mainfrom
Conversation
Contributor
Author
|
Hey @MarkisDev, Let me know if any changes are needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduces two new Android home screen widgets:
NextAlarmHomeWidgetandAddAlarmHomeWidget. As mentioned in the issue as well, they are required for easy accessibility to the next alarm's details and for adding an alarm. Tackled by using ahome_widgetpackage, and created two home widgets.For each widget below, the files added are:
HomeWidget.ktxmlfiles fordefault,v21,night,v21-night)xmlfiles for home widget)strings.xmlandstyles/if required)xmlfiles)In
MainActivity.kt, fetched the latest alarm details and updated the changes of the latest alarmRings in __using a 1 min loop, by calculating theRings in __value. And added the MethodChannel for opening the add-or-update-alarm screen for the add alarm home widget.In
NextAlarmHomeWidget.kt, updated the values of the layout design based on the values received. It looked better without an AddAlarm button, Currently I have commented that part as it was mentioned in the issue, so if required I will put that back, or remove it.Added all required icons in drawable, for showing them on the widget if enabled.
In
AddAlarmHomeWidget, in the same way, add the intent for the add alarm button.Now, in the home_controller's
refreshingAlarmmethod, I have added anupdateHomeWidgetDatawhere the latest alarm that is going to ring, its data will be sent to home widgets.Finally, in the splash screen controller, if the initial route from the expected method channel is
add-update-alarm, then navigate the user to the AddUpdate alarm screen, via the home screen.Proposed Changes
The main changes proposed in the issue were:
A combination of both will be implemented if required, but as of now, the UI for that has to be discussed, as it looks very messy merging both.
Fixes #254
Screenshots
Demo Video Link: https://drive.google.com/file/d/1zqrbWTbXSzcAIzujpaNB5y9FRPTRKbI3/view?usp=sharing
Checklist