Skip to content

Commit

Permalink
Merge branch 'improvements/readme-0-7-5' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelsetragni committed Sep 25, 2023
2 parents db5ba4e + 3314b81 commit 3664587
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
## [0.7.5]
### Added
* Support to iOS 17
* Compatibility to AGP 8
* Automated tests for dart code in master with +90% of coverage
* Full support for Flutter 3.13
* Support for iOS 17
* Compatibility with AGP 8
* Automated tests for Dart code in master, with over 90% coverage
### Fixed
* New image provider for native resource media
### Improved
* Project dependencies upgraded to the last version available
* Project dependencies upgraded to the latest version available
* Documentation updated

## [0.7.5-dev.3]
### Added
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -754,15 +754,18 @@ The notification category is a group of predefined categories that best describe

# 👮‍♀️ Requesting Permissions

Permissions give transparency to the user of what you intend to do with your app while it's in use. To show any notification on a device, you must obtain the user's consent, and keep in mind that this consent can be revoked at any time, on any platform. On Android, the basic permissions are always granted to any newly installed app, but for iOS, even the basic permission must be requested from the user.
Permissions give transparency to the user about what you intend to do with your app while it's in use. To show any notification on a device, you must obtain the user's consent. Keep in mind that this consent can be revoked at any time, on any platform. On Android 12 and below, the basic permissions are always granted to any newly installed app. But for iOS and Android 13 and beyond, even the basic permission must be requested from the user.

> **Disclaimer:**
> On Android, revoke certain permissions, including notification permissions, may cause the system to automatically restart the app to ensure the new permission setting is respected. Handle this scenario in your code by saving any necessary state before requesting or changing permissions, and restoring that state when the app is restarted. Inform your users about this behavior to avoid confusion and ensure a smoother user experience.
Permissions can be defined in three types:

- **Normal permissions:** These are permissions that are not considered dangerous and do not require explicit user consent to be enabled.
- **Execution permissions:** These are permissions that are considered more sensitive to the user, and you must obtain their explicit consent to use.
- **Special/Dangerous permissions:** These are permissions that can harm the user experience or their privacy, and you must obtain their explicit consent. Depending on the platform, you may need permission from the manufacturer to use them.
- **Normal permissions:** These permissions are not considered dangerous and do not require explicit user consent to be enabled.
- **Execution permissions:** These permissions are considered more sensitive to the user, and you must obtain their explicit consent to use them.
- **Special/Dangerous permissions:** These permissions can harm the user experience or their privacy, and you must obtain their explicit consent. Depending on the platform, you may need permission from the manufacturer to use them.

As a good practice, always check if the permissions you desire are granted before creating any new notification, regardless of the platform. To check if a permission requires explicit user consent, call the method shouldShowRationaleToRequest. The list of permissions that require a rationale to the user can be different between platforms and OS versions. If your app does not require a permission to execute what you need, consider not requesting it and respecting the user's will.
As a good practice, always check if the permissions you desire are granted before creating any new notification, regardless of the platform. To check if a permission requires explicit user consent, call the method `shouldShowRationaleToRequest`. The list of permissions that require a rationale to the user can differ between platforms and OS versions. If your app does not require a permission to execute what you need, consider not requesting it, respecting the user's will.

<br>

Expand Down
2 changes: 1 addition & 1 deletion lib/src/helpers/bitmap_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class BitmapHelper {
final Completer completer = Completer<ImageInfo>();
final ImageStream stream = provider.resolve(const ImageConfiguration());
final listener =
ImageStreamListener((ImageInfo info, bool synchronousCall) {
ImageStreamListener((ImageInfo info, bool synchronousCall) {
if (!completer.isCompleted) {
completer.complete(info);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/src/models/base_notification_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ class BaseNotificationContent extends Model {
NOTIFICATION_BACKGROUND_COLOR, backgroundColor),
_chronometer = AwesomeAssertUtils.getValueOrDefault<Duration>(
NOTIFICATION_CHRONOMETER,
(chronometer?.inSeconds ?? -1) < 0 ? null : chronometer),
(chronometer?.inSeconds ?? -1) < 0 ? null : chronometer),
_timeoutAfter = AwesomeAssertUtils.getValueOrDefault<Duration>(
NOTIFICATION_TIMEOUT_AFTER,
(timeoutAfter?.inSeconds ?? -1) < 0 ? null : timeoutAfter),
(timeoutAfter?.inSeconds ?? -1) < 0 ? null : timeoutAfter),
_payload = AwesomeAssertUtils.getValueOrDefault<Map<String, String?>>(
NOTIFICATION_PAYLOAD, payload),
_customSound = AwesomeAssertUtils.getValueOrDefault<String>(
Expand Down

0 comments on commit 3664587

Please sign in to comment.