apache / apache/cordova-plugin-inappbrowser
Fullscreen BUGFIX
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
## Problem
In fullscreen mode the notifications of other apps and the statusbar swipe down resize the browser.
### What is expected to happen?
In fullscreen mode the notifications of other apps and the statusbar swipe down resize the browser.
### What does actually happen?
The statusbar size is resize the inappbrowser.
## Information
### Command or Code
if (fullscreen) {
dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
### Environment, Platform, Device
Android
### Version information
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
## Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
## SOLUTION
```
I use this code for fix this issue.
if (fullscreen) {
dialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
dialog.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
}
```
But:
"This constant was deprecated in API level 30.
Use WindowInsets#getInsetsIgnoringVisibility(int) instead to retrieve insets that don't change when system bars change visibility state. "
Contributor guide
Research direction
The issue identifies the Android fullscreen branch using dialog.getWindow() and setFlags(...); start by locating that branch in the plugin’s Android source and reproducing the resize during notifications or status-bar gestures. Compare the supplied systemUiVisibility workaround with the API-30 deprecation, and consider it done when fullscreen remains stable without deprecated behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100