New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 709217 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug


Participants' hotlists:
ExternalNavigationIssues


Sign in to add a comment

Android chrome handles address bar link input differently from url click on a page

Project Member Reported by maxzhou@google.com, Apr 6 2017

Issue description

Steps to reproduce the problem:
Enter a url from chrome address bar has different result from clicking on the same url on a page on an Android device. Here is an example:

https://maps.app.goo.gl/?link=https://www.google.com/maps/place/Minneapolis&apn=com.google.android.apps.maps

Seems Chrome browser on Android device tries to handle the url entered in the address bar within itself without resolving intent through Android.

Scanning NFC tag also results in opening the link from Chrome browser address bar.

How Chrome browser is handling address bar input differently from a click on a page, is there any way to force Chrome to resolve address bar input through Android system or treat the address bar input the same way as a click on a page?

For a reference, other mobile browsers such as Firefox, etc. on Android, does not have this issue.

What is the expected behavior?
typing in a url in chrome address bar has the same result of clicking a url on a page, both should open the google maps App.

What went wrong?
chrome incorrectly handles/interpretes the url entered from chrome address bar and opens a GooglePlay webpage

Did this work before? No 

Chrome version: 57.0.2987.98  Channel: stable
OS Version: 7
Flash Version:
 
Components: -Platform>DevTools Infra>Client>Android
This is not devtools, I am not exactly sure which component to put this under, so please re-assign it if it's not Infra>Client>Android.
Components: -Infra>Client>Android UI>Browser>Omnibox Internals>Network
I would guess this is somewhere in the omnibox or net code? It's definitely not infrastructure.
Cc: mariakho...@chromium.org
mariakhomenko@ knows this area well; I'm sure she knows this situation well.  (I have a vague recollection that this behavior is  intentional but don't recall the details.)
This is working as intended.

We do not want input into omnibox to dispatch intents to other applications. This behaviour is surprising and not what user generally intends to do when they type into omnibox. Consider a user wanting to see a map of minneapolis -- they are unlikely to type a url to maps app in Chrome if they want to see the maps app.

For redirect links (e.g. goo.gl -> https://maps.google.com) that originate elsewhere, but go through Chrome because they don't match the manifest, we will handle this by sending the user to the application. However, for someone using Chrome and intentionally typing into omnibox, that's a signal for us that they want to see a webpage.
Status: WontFix (was: Unconfirmed)

Comment 6 by maxzhou@google.com, Apr 7 2017

The issue is that Chrome opens the GooglePlay, but does not respect the GooglePlay continue URL feature. Making this a real issue, only Google phones (nexus/pixel) treat NFC tag scanning as Chrome browser address bar input. Other browsers, other phones work well. At least Chrome address bar input should send a different user agent from the one being sent when page link is clicked. Thanks for your attention.

Comment 7 by maxzhou@google.com, Apr 7 2017

I meant it opens the GooglePlay App.
Scanning the NFC tag should result in an incoming intent to the browser, which would not be treated the same way as the URL typed in the omnibox. Could you paste logcat output for the NFC tag scan?

Comment 9 by maxzhou@google.com, Apr 10 2017

Thanks Maria, two questions:
1. is there any way the server tell the omnibox input from regular page clicks? Both user agents are identical.
2. is there any way omnibox input to work with GooglePlay continue url (go/phonesky)?

Cc: -mariakho...@chromium.org
Owner: mariakho...@chromium.org
Status: Assigned (was: WontFix)
1. No, and this is not something we would expose in a useragent

2. Could you write-up a specific example of what that would look like? I don't know what continue URLs for Play are or how you are setting up your link. Be specific about the shape of the original URL, system setup, and what you would expect to happen. Then we can discuss whether it's feasible.

Comment 11 by maxzhou@google.com, Apr 11 2017

Here is the description of continue url:
https://sites.google.com/a/google.com/universal-store/documentation/android-client/integration/continue-urls?pli=1

It used to work with Chrome browser.
Labels: -Pri-2 Pri-3
Maria,

It looks like this feature request is owned by you, and the reporter wrote up the doc you requested.  Can you evaluate it?
Cc: mariakho...@chromium.org
Owner: thildebr@chromium.org
Troy, can you take a look at this?
Project Member

Comment 14 by bugdroid1@chromium.org, Jul 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/24abd20270d691680857da86bb1e228fd40ba72c

commit 24abd20270d691680857da86bb1e228fd40ba72c
Author: Troy Hildebrandt <thildebr@chromium.org>
Date: Wed Jul 12 00:04:06 2017

Ensure URLs are not overridden when pasted into omnibox.

We get PageTransition.FROM_ADDRESS_BAR when pasting a URL into the omnibox, and
as a result this is treated differently than typing the URL in manually.

This fix treats both PageTransition.TYPED and PageTransition.FROM_ADDRESS_BAR
as being typed for the purposes of URL overriding in
ExternalNavigationHandler#shouldOverrideUrlLoadingInternal.

Bug:  709217 
Change-Id: Ieb4ff5a724c67ad802bba2921a8ada4a123471d6
Reviewed-on: https://chromium-review.googlesource.com/567578
Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org>
Commit-Queue: Troy Hildebrandt <thildebr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485733}
[modify] https://crrev.com/24abd20270d691680857da86bb1e228fd40ba72c/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
[modify] https://crrev.com/24abd20270d691680857da86bb1e228fd40ba72c/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java

Status: Fixed (was: Assigned)

Sign in to add a comment