+9
Under review

Android 12 and the "Disambiguation Dialog"

magma1447 3 years ago updated by joemadder 2 years ago 3

I own a Pixel phone, and even though I had read that Android 12 would ruin the whole intent system and remove the free choice from users I upgraded to Android 12 on the release day. One of many things that have changed with Android 12 is that the Disambiguation dialog has been removed. This is the dialog which asks the user in which app to open a link when multiple apps have subscribed for the same kind of links.

First I then need to describe in a very basic way how Android works when you click links. Apps can create intents which basically says "I support opening all links that starts with http://coord.info/ and https://www.geocaching.com/".
This is basically what GCDroid says. The same links are also subscribed to by the web browser (everything starting with http:// and https:// I guess), and other Geocaching apps. So the first time a user clicks such link the operating system asks with what app the user wants to open the link. This is the Disambiguation Dialog. The user can then choose to open it in a certain app this time only, or always.

Back in 2016 Samsung removed this option, but about a year later they added a setting to let the user enable it again. This was the last time I bought a Samsung phone since I felt it really ruined my experience. I am now a Google Pixel owner, which obviously wasn't a long enough time solution, because Android 12 has now also removed this Dialog, implementing "the phone knows best".

The reason I want this dialog is because I sometimes want to open a geocaching link in GCDroid, and sometimes in Chrome. Others might want to open the links in other geocaching apps at times. The phone can not know what I want right now.

The way Android 12 does it is that all links are bound to a "web browser". You can choose your default web browser. You can not anymore unsubscribe any default opening from your web browser as you could pre Android 12. You can however enter app settings of GCDroid (not inside GCDroid, but in OS settings/Apps/...) and enable certain links to be bound to GCDroid. In certain cases an app can have "verified links" that are automatically enabled. But you can only do that if you also own the site on those links. So HQs geocaching app can forces links to be opened in their app, and not in the web browser. I do not know if this can be disabled by the user, but I hope so.

Anyway. So first thing I did was enable those links in the settings of the app. Since GCDroid has intents for the links they are already listed, I just needed to check some boxes. Now my links opened in GCDroid, great! But, two issues:

* I can still not choose where to open them, so now I can never open them with my web browser. Which I do sometimes for various reason. Not the least because the web shows stuff not available to the apps. Sometimes also because I don't want to move the map away in my GCDroid instance and so forth.

* The "Open in web browser" link inside GCDroid does not work anymore. Since the links are bound to GCDroid, and can never be opened in a web browser anymore. Not sure if this can be changed by using newer APIs available in the SDKs, but I doubt it.


So what's the solution? Back in 2016 when I had a similar issue with Samsung I found an app called Better Open With (https://play.google.com/store/apps/details?id=com.aboutmycode.betteropenwith). The intention of that app is to re-implement the behavior of the Disambiguation dialog. What it does is that it register itself as a web browser, catches all http(s) links and shows a dialog asking the user in which app to open the link (out of those that has subscribed to the matching url-format). If there is only one app matching, that one is opened directly.

Now with Android 12 I tried that app again, and it still works great as a workaround, even though the app seems partly abandoned. Just make sure to use Better Open With as the default web browser and remove any active link subscriptions from GCDroid (explained above how to enable them). I say partly abandoned because the link the web page of the app wasn't working and last update was in January 2021. This is now the solution I will use until someone makes an even better app to get around this issue.

The cons with the app? The dialog doesn't look as good as the original (in my opinion). There is no "always open this link in this app" function.  This is because the whole intent of the app is to prevent that functionality. Remember that it's not made to solve any Android 12 issues.

PS! I wasn't sure which topic type to use. This obviously isn't a bug of GCDroid, more of a bad design of Android itself. But there wasn't any other fitting topic either. My point of posting it is mostly to inform both the developer, and the users of the app. Maybe it should be moved to Praises since that's more of a misc topic group?

Disclaimer: I am not an Android developer, so from a technical perspective some parts of what I have written might be close to the truth, but not 100% correct.

Answer

Answer
Under review

I need a new phone ;-) My Galaxy S10 did not see Android 12 yet. Up until now I always was able to run the latest and greatest....

I will look at that and see what I can do.... Obviously if other apps can 'create' that dialog, so can I (I guess hahaha)

What potentially is a bug with GCDroid from all the above is that I think you can't use the menu option to "open in web browser" if that link has been associated to always open in GCDroid. But I am not 100% certain and I can't test it now when I am at Android 12.

Answer
Under review

I need a new phone ;-) My Galaxy S10 did not see Android 12 yet. Up until now I always was able to run the latest and greatest....

I will look at that and see what I can do.... Obviously if other apps can 'create' that dialog, so can I (I guess hahaha)

I think it's not a bug but a new feature of Android 12: Verify Android App Links

https://developer.android.com/training/app-links/verify-site-associations