apache / apache/cordova-plugin-inappbrowser

"intent:" URI is parsed incorrectly

Open
#880 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.1k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/apache/cordova-plugin-inappbrowser/blob/3b6757fc4407aa5cd9d5cbda3ff2f8174ecdae1a/src/android/InAppBrowser.java#L1203

In the shouldOverrideUrlLoading, the code seems to be also capable of parsing intent URIs. However, in case of intent URI, for example **intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end**, `intent.setData` will not work at all when it is passed to `startActivity`. To be able to parse intent URIs, `intent.parseUri` should be used instead.

Contributor guide

Open the contributing guide

Research direction

Read src/android/InAppBrowser.java around shouldOverrideUrlLoading at line 1203. Reproduce the reported intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end URI and inspect how the resulting Intent is passed to startActivity. Done means intent URIs are parsed and launched correctly instead of failing with intent.setData.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.