Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidStrausz authored Dec 19, 2024
2 parents d5d203b + 74fe051 commit 3ac4cd0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,24 @@ public void open(PluginCall call) {

if (implementation.areCustomTabsSupported()) {
// open the browser and finish
try {
Intent intent = new Intent(getContext(), BrowserControllerActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getContext().startActivity(intent);
Intent intent = new Intent(getContext(), BrowserControllerActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getContext().startActivity(intent);

Integer finalToolbarColor = toolbarColor;
setBrowserControllerListener(
activity -> {
Integer finalToolbarColor = toolbarColor;
setBrowserControllerListener(
activity -> {
try {
activity.open(implementation, url, finalToolbarColor);
browserControllerActivityInstance = activity;
call.resolve();
} catch (ActivityNotFoundException ex) {
Logger.error(getLogTag(), ex.getLocalizedMessage(), null);
call.reject("Unable to display URL");
}
);
} catch (ActivityNotFoundException ex) {
Logger.error(getLogTag(), ex.getLocalizedMessage(), null);
call.reject("Unable to display URL");
}
}
);
} else {
// fallback to opening the URL in the default browser
Intent browserIntent = new Intent(Intent.ACTION_VIEW, url);
Expand Down
7 changes: 7 additions & 0 deletions local-notifications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ npx cap sync
```

## Android

Android 13 requires a permission check in order to send notifications. You are required to call `checkPermissions()` and `requestPermissions()` accordingly.

On Android 12 and older it won't show a prompt and will just return as granted.
Expand All @@ -24,6 +25,12 @@ Note that even if the permission is present, users can still disable exact notif

On Android 14, there is a new permission called `USE_EXACT_ALARM`. Use this permission to use exact alarms without needing to request permission from the user. This should only be used if the use of exact alarms is central to your app's functionality. Read more about the implications of using this permission [here](https://developer.android.com/reference/android/Manifest.permission#USE_EXACT_ALARM).

From Android 15 onwards, users can install an app in the [Private space](https://developer.android.com/about/versions/15/features#private-space). Users can lock their private space at any time, which means that push notifications are not shown until the user unlocks it.

It is not possible to detect if an app is installed in the private space. Therefore, if your app shows any critical notifications, inform your users to avoid installing the app in the private space.

For more information about the behavior changes of your app related to the private space, refer to [Android documentation](https://developer.android.com/about/versions/15/behavior-changes-all#private-space-changes).

## Configuration

<docgen-config>
Expand Down
6 changes: 6 additions & 0 deletions push-notifications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ The Push Notification API uses [Firebase Cloud Messaging](https://firebase.googl

Android 13 requires a permission check in order to receive push notifications. You are required to call `checkPermissions()` and `requestPermissions()` accordingly, when targeting SDK 33.

From Android 15 onwards, users can install an app in the [Private space](https://developer.android.com/about/versions/15/features#private-space). Users can lock their private space at any time, which means that push notifications are not shown until the user unlocks it.

It is not possible to detect if an app is installed in the private space. Therefore, if your app shows any critical notifications, inform your users to avoid installing the app in the private space.

For more information about the behavior changes of your app related to the private space, refer to [Android documentation](https://developer.android.com/about/versions/15/behavior-changes-all#private-space-changes).

### Variables

This plugin will use the following project variables (defined in your app's `variables.gradle` file):
Expand Down

0 comments on commit 3ac4cd0

Please sign in to comment.