Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tuuhin
Copy link
Owner

@tuuhin tuuhin commented Oct 9, 2024

Feature: Widgets

Added widgets for the app

  • Recorder Widget: It will show on the home screen recording status of the current recording, and yes, its oversimplified.
  • Recordings widget: Shows the list of current recordings as like recordings screen.

tuuhin and others added 5 commits October 6, 2024 22:42
Dependencies are updated to latest version.
Time to create widgets for the app.
Trying to make the UI for the widgets beforehand in order to check what is needed
Receiver,GlanceAppWidget child as AppRecordingsWidget are all configured and added.
RecordingsList contains the list of current recording only the Ui is completed later update mechanism and other changes will be added.
Added layout files representing the loading , error and previews cases are also added.
Preview layout need colors from res files so added the colors in colors.xml.
…xed some other problems.

AppRecorderWidget is the next widget this simply shows if the current recording is running.
As per the update logic the info need to be saved and read to see the updates, In RecorderWidgetDefinition the content is being saved in a proto file and then read in the widget.
VoiceRecorderService updated the content of the file each seconds when the recorder is running on save or cancelled the widget is again reset to norm values.
In AudioFilePlayerListener there was a case where we are getting negative duration fixed that.
PlayerTrackData.allPositiveAndFinite ensures all the data is positive and finite.
Recordings widget dimens changes to 4x2.
Added a new mic icon for the AppRecorderWidget.
The UI for the recorder widget is kept as simple as possible, this maybe changed in the future.
In widget_loading_failed_layout.xml icon is changed.
In AppRecorderWidget an intent action is being added to take to the recording screen.
The widget size is simply enough so made it non-resizable in recorder_widget.xml.
As per AppRecordingsWidget the data is now being updated.
GetRecordingsOfCurrentAppUseCase is injected in the GlanceAppWidget via a custom entry point, the observable is collected and on any update on GetRecordingsOfCurrentAppUseCase flow the recording widget is updated via AppWidgetRepo.
Again changed back to 2x2 formation for recordings.
As I did change the configuration many time GlancePreviewRecordings helps to set up the height and width for the widget preview.
On click on AppRecordingsWidget it's linked to recordings screen.
@tuuhin tuuhin merged commit e14e80d into development Oct 9, 2024
@tuuhin tuuhin deleted the widgets branch October 9, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants