"This link needs to be opened with an application" is an awful message

RESOLVED FIXED in Firefox 23

Status

()

RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: wesj, Assigned: wesj)

Tracking

unspecified
Firefox 23
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: ui-hackathon)

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

6 years ago
In our ContentDispatchChooser, we often wind up showing the user a Dialog that says "This link needs to be opened with an application." [1]. I think maybe we should just kill off this prompt. I realize there are security reasons not to, so we should have a pref to turn it back on easily, but right now its too cryptic to be useful to users.

Alternatively, we should fix the message to not be so cryptic. "Open this link in Maps" with the link shown in the title, or even "Pick an app to open this link:" with a list.

[1] http://mxr.mozilla.org/mozilla-central/source/toolkit/locales/en-US/chrome/mozapps/handling/handling.properties#6
(Assignee)

Comment 1

6 years ago
Created attachment 732128 [details] [diff] [review]
Patch

I spent awhile on this today. It turns out we don't get a very good list of "apps" that we can launch here. In soe cases ("intent" url's) that makes sense. Sending just the scheme really doesn't tell Android much. In other cases, ("market" urls), I'm not really sure what's up.

Ideally we'd get a list and show a list of apps to the user. Since I wasn't getting much in the way of available apps, that was relatively useless. This instead just changes the prompt strings to include the url, so that there's at least something for the user to identify. Will keep playing with the second piece here...
(Assignee)

Comment 2

6 years ago
Created attachment 732140 [details] [diff] [review]
Patch

This is more what I wanted. It shows a list of specific applications you can use if we have them. The url is shown (truncated) in the title of the dialog.

Otherwise, it just shows the same as the previous patch. A confirm dialog with "Open url" in the title and "Open %S" as the message.
Attachment #732128 - Attachment is obsolete: true
Attachment #732140 - Flags: review?(mark.finkle)
Comment on attachment 732140 [details] [diff] [review]
Patch

># HG changeset patch
># Parent 09db063c3ae3e77ef525ffac9cae183871c2c261
>
>diff --git a/mobile/android/base/GeckoAppShell.java b/mobile/android/base/GeckoAppShell.java
>--- a/mobile/android/base/GeckoAppShell.java
>+++ b/mobile/android/base/GeckoAppShell.java
>@@ -793,18 +793,21 @@
>         if (aMimeType != null && aMimeType.length() > 0)
>             intent.setType(aMimeType);
>         return getHandlersForIntent(intent);
>     }
> 
>     static String[] getHandlersForURL(String aURL, String aAction) {

>+        Log.i(LOGTAG, "Get Handler for Url= " + uri.toString() + ", action= " + aAction);

Remove

>+        Intent intent = getOpenURIIntent(GeckoApp.mAppContext, uri.toString(), "",
>+            TextUtils.isEmpty(aAction) ? Intent.ACTION_VIEW : aAction, "");

Tell me more about what changes you are making here. Will this break any other consumers/callers?

>+        //getIntentForActionString(aAction);
>+        //intent.setData(uri);

Remove

>         final String scheme = uri.getScheme();
>+        Log.i(LOGTAG, "Got scheme: " + scheme);

Remove

>diff --git a/mobile/android/components/ContentDispatchChooser.js b/mobile/android/components/ContentDispatchChooser.js
>+    Services.console.logStringMessage("Got " + aHandler.possibleApplicationHandlers.length + " results");

Remove

>+    // The first handler in the set is the Android Application Chooser (which will fall back to a default if one is set)
>+    // If we have more than one option, show a list so the user can choose what to launch with.
>+    if(aHandler.possibleApplicationHandlers.length > 1) {

if (

>+      let msg = {
>+        type: "Prompt:Show",
>+        multiple: false,
>+        selected: [],
>+      };
>+      msg.title = bundle.formatStringFromName("protocol.title.list", [aURI.spec], 1);

I wonder about showing a URL. Maybe just show "Open Link"

>+      // We probably only have the Android Application Chooser to launch with. Give the user the option of trying
>+      let title = bundle.GetStringFromName("protocol.title.single");
>+      let text =  bundle.formatStringFromName("protocol.message", [aURI.spec], 1);

Again, I don't like showing the URL. Maybe we could just show the Android picker without a confirm step? The Android picker allows you to cancel out.

>diff --git a/mobile/android/locales/en-US/chrome/handling.properties b/mobile/android/locales/en-US/chrome/handling.properties

>+protocol.title.list=Open %S
>+protocol.title.single=Open url

I like "Open Link" for both of these

>+protocol.message=Open %S?

Maybe we can kill this one by just using the picker

I want to hold off until Ian can give Feedback too. Can you make a screenshot of the prompts? Can you verify that we could just jump to the Android picker instead of using another prompt?
Attachment #732140 - Flags: review?(mark.finkle) → feedback+
(Assignee)

Comment 4

6 years ago
The Android picker won't show if there's only one app in the list or if you've set a default for url's of this type. I'd be fine letting some url's pass through. I think ExternalAppHelper already has this code, desktop shows a checkbox "Remember this decision" on this prompt, and deliberately force some types of urls (intents) to prompt (and show the app list so that you know what's happening?). i.e. I like having this around in case we need to protect people.
(Assignee)

Comment 5

6 years ago
(In reply to Wesley Johnston (:wesj) from comment #4)
Grr. I should not be allowed to type. I meant I'd be fine letting some url's through, but it'd be good to have a GOOD prompt for special cases (like the Intent one)

> some types of urls (intents) to prompt (and show the app list so that you
> know what's happening?). i.e. I like having this around in case we need to
> protect people.
(Assignee)

Comment 6

6 years ago
Created attachment 741563 [details] [diff] [review]
Patch v2

This basically removes the dialog. If there's only one "handler" for this url, we assume its the Android App Chooser and just show a toast reading "Could not find an app to open this link"
Attachment #732140 - Attachment is obsolete: true
Attachment #741563 - Flags: review?(mark.finkle)
(Assignee)

Updated

6 years ago
Whiteboard: ui-hackathon
Comment on attachment 741563 [details] [diff] [review]
Patch v2

>diff --git a/mobile/android/components/ContentDispatchChooser.js b/mobile/android/components/ContentDispatchChooser.js
>+    // If we have more than one option, show a list so the user can choose what to launch with.

Just want this to be more clear:
// If we have more than one option, let the OS handle showing a list (if needed).

>+    if(aHandler.possibleApplicationHandlers.length > 1) {

if (

>diff --git a/mobile/android/locales/en-US/chrome/handling.properties b/mobile/android/locales/en-US/chrome/handling.properties

>+protocol.failed=Could not find an app to open this link

Could we use "Firefox" (pulled in via a brand properties file), we seem to use contractions in other strings, and "app" should probably be spelled out:

%S couldn't find an application to open this link
Attachment #741563 - Flags: review?(mark.finkle) → review+
(In reply to Mark Finkle (:mfinkle) from comment #7)

Wait. I realized this was in a toast. The string should not be what I suggested. See below:

> >diff --git a/mobile/android/locales/en-US/chrome/handling.properties b/mobile/android/locales/en-US/chrome/handling.properties
> 
> >+protocol.failed=Could not find an app to open this link
> 
> Could we use "Firefox" (pulled in via a brand properties file), we seem to
> use contractions in other strings, and "app" should probably be spelled out:
> 
> %S couldn't find an application to open this link

Let's not add "Firefox", so:

Couldn't find an application to open this link
https://hg.mozilla.org/mozilla-central/rev/9915ad231d5b
https://hg.mozilla.org/mozilla-central/rev/104d4a16aac8
Assignee: nobody → wjohnston
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Depends on: 869019
Oh hai. This broke YouTube protocol handling (vnd:youtube): bug 869019.
You need to log in before you can comment on or make changes to this bug.