apache / apache/cordova-plugin-inappbrowser
On ("loadstart") event not working on Android, only on IOS
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
## Problem
### What is expected to happen?
Open a PDF file on another page.
### What does actually happen?
On Android nothing happens, not even an error, as if the event was not called.
## Information
A time ago, it used to work well, the file in pdf format opens on another page, but now on Android this function does not work, only on IOS.
### Command or Code
browser.on("loadstart").subscribe(`
(ev: InAppBrowserEvent) => {
if (ev.url.includes("file-pdf")) {
const browser2 = this.browser.create(ev.url, "_system", iabOptions);
browser2.show();
browser = this.newBroser(this.urlRedirect);
}
},
(err) => {
console.log("InAppBrowser loadstart Event Error: " + err);
}
);
### Environment, Platform, Device
On any Android device, IOS works well.
### Version information
Cordova: 9.0.0 (cordova-lib@9.0.1)
Ionic: 5.4.13
Android-targetSdkVersion: 28
## Checklist
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
- [x] I searched for existing GitHub issues
Contributor guide
Research direction
Start with the browser.on("loadstart") subscription and reproduce the PDF navigation on an Android device, then compare the behavior with iOS. Review the Android implementation of the loadstart event; done means the event fires and the shown PDF flow works on Android without regressing iOS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100