feat(android-edge-to-edge-support): add enable(), disable() and getInsets() methods#498
Merged
Conversation
…getInsets()` methods
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds new methods (enable, disable, and getInsets) to support Android edge‐to‐edge mode in the plugin. Key changes include:
- Updating the TypeScript definitions and documentation to expose the new API.
- Adding corresponding implementations in the Android native code.
- Updating the example app (JavaScript and HTML) to demonstrate the new functionalities.
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/android-edge-to-edge-support/src/definitions.ts | Added new interface methods and the GetInsetsResult interface. |
| packages/android-edge-to-edge-support/example/src/js/script.js | Updated the demo code to add event listeners for enable, disable, and getInsets. |
| packages/android-edge-to-edge-support/example/src/index.html | Replaced the old button with new buttons for the new methods. |
| packages/android-edge-to-edge-support/android/src/main/java/io/capawesome/capacitorjs/plugins/androidedgetoedgesupport/EdgeToEdgePlugin.java | Introduced new PluginMethods for enable, disable, and getInsets. |
| packages/android-edge-to-edge-support/android/src/main/java/io/capawesome/capacitorjs/plugins/androidedgetoedgesupport/EdgeToEdge.java | Added native implementations for the new methods and insets management. |
| packages/android-edge-to-edge-support/README.md | Updated documentation to include the new API methods. |
| .changeset/unlucky-ads-rest.md | Added a changeset file to describe the new features. |
Files not reviewed (1)
- packages/android-edge-to-edge-support/example/package-lock.json: Language not supported
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Android edge-to-edge functionality by introducing three new methods: enable(), disable(), and getInsets(). The changes update both the plugin definitions and implementations (TypeScript, Java, and JavaScript) as well as the documentation and example UI.
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/android-edge-to-edge-support/src/definitions.ts | Added new method signatures and a new GetInsetsResult interface |
| packages/android-edge-to-edge-support/example/src/js/script.js | Updated the example integration with event listeners for the new methods |
| packages/android-edge-to-edge-support/example/src/index.html | Added new buttons for enabling/disabling and retrieving insets |
| packages/android-edge-to-edge-support/android/src/main/java/io/capawesome/capacitorjs/plugins/androidedgetoedgesupport/EdgeToEdgePlugin.java | Introduced PluginMethods for enable(), disable(), and getInsets() |
| packages/android-edge-to-edge-support/android/src/main/java/io/capawesome/capacitorjs/plugins/androidedgetoedgesupport/EdgeToEdge.java | Implemented the new edge-to-edge functionalities and inset manipulation |
| packages/android-edge-to-edge-support/README.md | Updated documentation to include the new API methods and interfaces |
| .changeset/unlucky-ads-rest.md | Recorded the minor version update and summary of the feature changes |
Files not reviewed (1)
- packages/android-edge-to-edge-support/example/package-lock.json: Language not supported
@capawesome-team/capacitor-android-battery-optimization
@capawesome/capacitor-android-dark-mode-support
@capawesome/capacitor-android-edge-to-edge-support
@capawesome-team/capacitor-android-foreground-service
@capawesome/capacitor-app-review
@capawesome/capacitor-app-shortcuts
@capawesome/capacitor-app-update
@capawesome/capacitor-asset-manager
@capawesome/capacitor-background-task
@capawesome/capacitor-badge
@capawesome/capacitor-cloudinary
@capawesome-team/capacitor-datetime-picker
@capawesome-team/capacitor-file-opener
@capawesome/capacitor-file-picker
@capawesome/capacitor-live-update
@capawesome/capacitor-managed-configurations
@capawesome/capacitor-photo-editor
@capawesome/capacitor-posthog
@capawesome/capacitor-screen-orientation
@capawesome/capacitor-screenshot
@capawesome/capacitor-torch
commit: |
…/capawesome/capacitorjs/plugins/androidedgetoedgesupport/EdgeToEdge.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…/java/io/capawesome/capacitorjs/plugins/androidedgetoedgesupport/EdgeToEdge.java This reverts commit 5ac8a2e.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run changeset).