apache / apache/cordova-plugin-inappbrowser
Add Loading Indicator (Progress Bar) in InAppBrowser for Android
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
# Feature Request
## Motivation Behind Feature
Currently, there is no visual feedback indicating that content inside the InAppBrowser is loading. Users experience a blank screen until the webpage fully loads, refer this [(https://github.com/apache/cordova-plugin-inappbrowser/issues/1075)]. This could lead to confusion or a perception of slow performance. Adding a loading indicator (such as a spinner) would enhance the user experience.
## Feature Description
Add a ProgressBar or Spinner:
When the InAppBrowser starts loading a webpage, display a ProgressBar (spinner) in the center of the screen.
Once the webpage finishes loading, hide the ProgressBar.
The feature is dependent on the web content load time. If there is an error in loading the page, the progress bar may remain visible, so error handling must be considered.
## Alternatives or Workarounds
Currently, there is no easy way to visually indicate that the InAppBrowser is loading content. A custom implementation of this loader using native code, as suggested above, could solve the issue.
One workaround is to hide the browser and show it in the loadstop event, but due to this user stays on the native page for a long time and considers that no action is happening. This is because for iOS we have a loading indicator/progress bar.
So, we want the same behaviour for Android also.
Contributor guide
Research direction
Start by tracing the Android InAppBrowser loading lifecycle and the loadstop event mentioned in the issue, then compare the existing iOS loading behavior. Define the loading indicator's start, completion, and error paths; done means Android shows it while content loads, hides it after loading finishes, and does not remain visible after an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100