You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
最近,我正在开发一个小的开源项目,叫做“Open Link With”。希望不久后它能够在应用市场上架。
20
15
21
-
My app gives you the ability to switch between other apps. When you share a link with me, I basically grab the link and query all the Activity’s that can handle that link. And finally I mimic the system dialog and let you switch apps.
Android Marshmallow introduced App Links. The system basically authenticates with your web-page and opens those URLs automatically using your application without asking anything to user. Or you can go to system Settings, Apps, click an app, click “Open by default” and then set “Open in this app” to use always that app.
@@ -75,44 +51,24 @@ I researched a little bit and found MATCH_ALL flag. It’s documentation says th
75
51
public static final int MATCH_ALL = 0x00020000;
76
52
```
77
53
78
-
It didn’t do anything for me. I opened the source code (at least we have that!) and investigated the method.
79
-
80
-
It looks like they prioritize the domain verified applications. They did not just prioritize in their internal system, they also did it in the public API.
81
-
82
-
If there is a domain verified application, it does not return anything else. MATCH_ALL flag removes some system filters but only if there is no verified application.
I couldn’t find any way to workaround this behavior. It simply eliminates browser apps even when their IntentFilters match.
91
-
92
-
There is no workaround because it is an internal component (which we cannot access) and Android SDK communicates with it using IPC communication using AIDL.
Most of the developers are using this method to find if there is at least 1 Activity to handle the implicit Intent. In most of the situations the first item in the list is the one you want anyway.
After spending hours to understand what’s going on and trying to find a workaround, I thought everyone should know this.
103
-
104
-
There are lots of behavior changes in Android M. Google actually provided a list of behavior changes. You can find it here. I am sure that just like this, there are lots of hidden behavior changes that may break applications.
0 commit comments