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

Fix/notification adhan #1569

Merged
merged 27 commits into from
Feb 3, 2025
Merged

Conversation

YassinNouh21
Copy link
Contributor

This pull request includes several changes to the Android application, primarily focusing on adding new permissions, services, and methods to improve functionality. Additionally, there are updates to localization files to enhance translations and add new text entries.

Android Manifest Changes:

  • Added new permissions for system alert window, data sync, remote messaging, and media playback services in AndroidManifest.xml.
  • Added new services and receivers for background and audio services, including intent filters for media browser service and media button actions in AndroidManifest.xml.

Kotlin Code Updates:

  • Added new methods toggleTabletScreenOff, toggleTabletScreenOn, and grantOverlayPermission to MainActivity.kt to handle specific device commands and permissions. [1] [2] [3]

Localization Updates:

  • Updated intl_ar.arb file with new translations for various texts, including prayer times, RTSP camera settings, and error messages. Fixed a typo in the month name "جمادى الآخرة". [1] [2] [3] [4] [5]
  • Updated intl_ba.arb and intl_bg.arb files with new translations for Azkar lists and prayer-related texts. [1] [2] [3] [4]

Dart Code Updates:

  • Added a method to manually set the current localization in lib/i18n/l10n.dart.

ghassenbenzahra123 and others added 26 commits September 11, 2024 18:03
* fix: Improve Quran Download and Navigation Experience (#1452)

* fix: Ensure correct Moshaf type (Hafs) is displayed after download

* fix: display Hafs Quran correctly and remove success dialog

- Set Hafs as default Moshaf type if none is selected.
- Auto-dismiss success dialog on download completion.
- Improved state invalidation for Quran reading updates.
- Added FocusNode for better dialog interaction.
- Optimized resource management with keepAlive and link.close().

* fix: improve Quran Download and Navigation Experience

- Redirect user to Quran reading screen automatically after successful download and extraction of Quran (Hafs).
- Remove the unnecessary "OK" button to confirm Quran download completion, streamlining the user experience.
- Enhance state management for download-related UI in `quran_reading_screen.dart` to handle various download states (needed, downloading, extracting).
- Update `download_quran_popup.dart` to ensure proper navigation based on the user's first-time download experience.
- Improve error handling and loading indicators for a smoother and more intuitive flow.

* fix formating

* Update pubspec.yaml

* fix: Resolve overlapping and focus issues for Back and Switch buttons (#1457)

* fix: Resolve pop-up issue when selecting Listening mode (#1455)

- updated `_handleNavigation` method in `quran_mode_selection_screen.dart` to use `async/await` for ensuring proper completion of Quran mode selection before navigation.
- fixed unexpected pop-ups by adjusting the handling of the `moshafType` state in `download_quran_popup.dart`.
- improved navigation flow for both Reading and Listening modes, ensuring seamless user experience.

Co-authored-by: Ghassen Ben Zahra <ghassen.benzahra@gmail.com>

* Update pubspec.yaml

* fix merger conflict'

* remove just audio package

* format code

---------

Co-authored-by: Yassin Nouh <70436855+YassinNouh21@users.noreply.github.com>
Co-authored-by: Ibrahim ZEHHAF <97339607+ibrahim-zehhaf-mawaqit@users.noreply.github.com>
* fix: Improve Quran Download and Navigation Experience (#1452)

* fix: Ensure correct Moshaf type (Hafs) is displayed after download

* fix: display Hafs Quran correctly and remove success dialog

- Set Hafs as default Moshaf type if none is selected.
- Auto-dismiss success dialog on download completion.
- Improved state invalidation for Quran reading updates.
- Added FocusNode for better dialog interaction.
- Optimized resource management with keepAlive and link.close().

* fix: improve Quran Download and Navigation Experience

- Redirect user to Quran reading screen automatically after successful download and extraction of Quran (Hafs).
- Remove the unnecessary "OK" button to confirm Quran download completion, streamlining the user experience.
- Enhance state management for download-related UI in `quran_reading_screen.dart` to handle various download states (needed, downloading, extracting).
- Update `download_quran_popup.dart` to ensure proper navigation based on the user's first-time download experience.
- Improve error handling and loading indicators for a smoother and more intuitive flow.

* fix formating

* Update pubspec.yaml

* fix: Resolve overlapping and focus issues for Back and Switch buttons (#1457)

* fix: Resolve pop-up issue when selecting Listening mode (#1455)

- updated `_handleNavigation` method in `quran_mode_selection_screen.dart` to use `async/await` for ensuring proper completion of Quran mode selection before navigation.
- fixed unexpected pop-ups by adjusting the handling of the `moshafType` state in `download_quran_popup.dart`.
- improved navigation flow for both Reading and Listening modes, ensuring seamless user experience.

Co-authored-by: Ghassen Ben Zahra <ghassen.benzahra@gmail.com>

* Update pubspec.yaml

* fix merger conflict'

* fix schedule save after device restart

* fix reshedule to clear timers

* add printstatements debug prod

* remove restore on main

* add delay to restore timers

* remove feature from settings

* remove print statements

---------

Co-authored-by: Yassin Nouh <70436855+YassinNouh21@users.noreply.github.com>
Co-authored-by: Ibrahim ZEHHAF <97339607+ibrahim-zehhaf-mawaqit@users.noreply.github.com>
* fix: Improve Quran Download and Navigation Experience (#1452)

* fix: Ensure correct Moshaf type (Hafs) is displayed after download

* fix: display Hafs Quran correctly and remove success dialog

- Set Hafs as default Moshaf type if none is selected.
- Auto-dismiss success dialog on download completion.
- Improved state invalidation for Quran reading updates.
- Added FocusNode for better dialog interaction.
- Optimized resource management with keepAlive and link.close().

* fix: improve Quran Download and Navigation Experience

- Redirect user to Quran reading screen automatically after successful download and extraction of Quran (Hafs).
- Remove the unnecessary "OK" button to confirm Quran download completion, streamlining the user experience.
- Enhance state management for download-related UI in `quran_reading_screen.dart` to handle various download states (needed, downloading, extracting).
- Update `download_quran_popup.dart` to ensure proper navigation based on the user's first-time download experience.
- Improve error handling and loading indicators for a smoother and more intuitive flow.

* fix formating

* Update pubspec.yaml

* fix: Resolve overlapping and focus issues for Back and Switch buttons (#1457)

* fix: Resolve pop-up issue when selecting Listening mode (#1455)

- updated `_handleNavigation` method in `quran_mode_selection_screen.dart` to use `async/await` for ensuring proper completion of Quran mode selection before navigation.
- fixed unexpected pop-ups by adjusting the handling of the `moshafType` state in `download_quran_popup.dart`.
- improved navigation flow for both Reading and Listening modes, ensuring seamless user experience.

Co-authored-by: Ghassen Ben Zahra <ghassen.benzahra@gmail.com>

* Update pubspec.yaml

* fix merger conflict'

* merge main into 1.18

* code format

---------

Co-authored-by: Yassin Nouh <70436855+YassinNouh21@users.noreply.github.com>
Co-authored-by: Ibrahim ZEHHAF <97339607+ibrahim-zehhaf-mawaqit@users.noreply.github.com>
…r services architecture

- Add manual localization support for background service
- Implement dedicated service classes for notifications, prayer audio, and scheduling
- Refactor main initialization flow for better error handling
- Fix duplicate key in English localization file
- Add Arabic translation for prayer time notifications
- Improve code organization and error handling in background service
- Remove hardcoded notification strings in favor of localized messages
# Conflicts:
#	lib/l10n/intl_en.arb
#	lib/main.dart
#	lib/src/services/notification_background_service.dart
@ghassenbenzahra123 ghassenbenzahra123 self-requested a review February 3, 2025 11:57
Copy link
Contributor

@ghassenbenzahra123 ghassenbenzahra123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ghassenbenzahra123 ghassenbenzahra123 merged commit 6e45c68 into release-1.19 Feb 3, 2025
1 check passed
@ghassenbenzahra123 ghassenbenzahra123 deleted the fix/notification-adhan branch February 3, 2025 11:59
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.

Play adhan as notification when the app is killed or in background
3 participants