apache / apache/cordova-plugin-inappbrowser
OverrideUserAgent changes user agent for Cordova view too
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
This bug is already known as noted on https://github.com/apache/cordova-plugin-inappbrowser/pull/94 and https://github.com/ionic-team/ionic/issues/11790 but i couldn't find any active issue to track progress.
**What happened:**
In our specific case we use Ionic [Platform](https://ionicframework.com/docs/api/platform/Platform/) to programmatically check if platform is either "iOS" or "Android". In same time we use InAppBrowser for oauth on our server. Therefor we need to use `OverrideUserAgent` property.
Unfortunately as soon as we add `OverrideUserAgent` property Platform module doesn't work properly. It detects iOS and Android as desktop platform.
**Expected behavior**
Platform module should still be usable and properly detect iOS and Android platform.
Is there any progress on this issue or any suggestion how to avoid it?
EDIT: Same behavior on Android and iOS but Android can be avoided by using Crosswalk plugin.
Contributor guide
Research direction
Start by reproducing the OverrideUserAgent behavior with Ionic Platform and InAppBrowser on both Android and iOS, using the related Cordova pull request and Ionic issue as background. Trace how the OverrideUserAgent property affects platform detection; done means Ionic Platform still identifies iOS and Android correctly while the custom user agent remains available for OAuth.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript, objective-c
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100