id="hist_frame" name="hist_frame848832759" class="ss" tabindex="-1" style="height: 30px; left: -100px; position: absolute; top: -100px; width: 30px; font-family: Roboto, arial, sans-serif; font-size: 13px;">
加入 Google+
与合适的人分享合适的内容。

Android Developers
公开分享 - 2015年11月14日
Get rid of the app-selection dialog with Android App Links
+Wojtek Kaliciński
With Android Marshmallow we launched Android App Links, a better way to connect Android apps with their website counterparts.
App Links enable website owners to verify the linkage between their app and a domain that they control, so that when a user clicks a link to your site, Android can skip the app-selection dialog and proceed with opening the app directly.
There’s just a few things you need to do to enable App Links for your app:
1) add android:autoVerify="true" on one of your <intent-filter> tags that match web URLs
2) upload an assetlinks.json file with your certificate fingerprint to the /.well-known/assetlinks.json location on the web domains that you want to verify
3) install your APK on an Android Marshmallow emulator or device and test your App Links implementation
These steps, as well as the assetlinks.json format are explained in more detail in the DevByte ( https://goo.gl/6ixwJa) and documentation ( http://goo.gl/j3n9MD).
There are several caveats you need to be mindful of when implementing App Links:
App Links verification works per-app, not per <intent-filter>
As long as you have android:autoverify=”true” on even one <intent-filter>, all domains from all web intent filters in your manifest will be checked for a valid assetlinks.json file. If a single one of them fails, App Links will not be enabled for your app.
Please note that for an <intent-filter> to be considered for verification, it must declare an android:scheme value of http, https, or both. The filter must not declare any other schemes. The filter must also include the android.intent.action.VIEWaction and android.intent.category.BROWSABLE category.
Subdomains are treated as unique, separate hosts
If you want to use app links for subdomains, they must be explicitly listed in the <intent-filter> rules. You must also make sure that an assetlinks.json file is present on each subdomain. Unfortunately, HTTP 30x redirects are not supported at this time for App Links verification. There is however an include mechanism that you can use to point to another location if you want to reduce the amount of bookkeeping. Just put the following statement in your /.well-known/assetlinks.jsonfile and point it to a centralized configuration location:
[{ "include": " https://goo.gl/f5E2fv" }]
Note: HTTPS hosts can only include rules from another https:// URL.
If you find any blocking problems when implementing App Links, please sound off in the comments!
With Android Marshmallow we launched Android App Links, a better way to connect Android apps with their website counterparts.
App Links enable website owners to verify the linkage between their app and a domain that they control, so that when a user clicks a link to your site, Android can skip the app-selection dialog and proceed with opening the app directly.
There’s just a few things you need to do to enable App Links for your app:
1) add android:autoVerify="true" on one of your <intent-filter> tags that match web URLs
2) upload an assetlinks.json file with your certificate fingerprint to the /.well-known/assetlinks.json location on the web domains that you want to verify
3) install your APK on an Android Marshmallow emulator or device and test your App Links implementation
These steps, as well as the assetlinks.json format are explained in more detail in the DevByte ( https://goo.gl/6ixwJa) and documentation ( http://goo.gl/j3n9MD).
There are several caveats you need to be mindful of when implementing App Links:
App Links verification works per-app, not per <intent-filter>
As long as you have android:autoverify=”true” on even one <intent-filter>, all domains from all web intent filters in your manifest will be checked for a valid assetlinks.json file. If a single one of them fails, App Links will not be enabled for your app.
Please note that for an <intent-filter> to be considered for verification, it must declare an android:scheme value of http, https, or both. The filter must not declare any other schemes. The filter must also include the android.intent.action.VIEWaction and android.intent.category.BROWSABLE category.
Subdomains are treated as unique, separate hosts
If you want to use app links for subdomains, they must be explicitly listed in the <intent-filter> rules. You must also make sure that an assetlinks.json file is present on each subdomain. Unfortunately, HTTP 30x redirects are not supported at this time for App Links verification. There is however an include mechanism that you can use to point to another location if you want to reduce the amount of bookkeeping. Just put the following statement in your /.well-known/assetlinks.jsonfile and point it to a centralized configuration location:
[{ "include": " https://goo.gl/f5E2fv" }]
Note: HTTPS hosts can only include rules from another https:// URL.
If you find any blocking problems when implementing App Links, please sound off in the comments!
79
29




3 条评论

Liran Barsisa
上午1:27
+
3
4
3
4
3
I have a question about this as a user: What if I do want to open the link on the web browser? Many times, the website has more features than the app, and also allows to copy text easily.
Even more than that: It seems that for the new "default apps" feature (which is similar to here), when I as a developer query all apps that can handle the intent, I get a single item instead of multiple ones. How can I avoid this?
Even more than that: It seems that for the new "default apps" feature (which is similar to here), when I as a developer query all apps that can handle the intent, I get a single item instead of multiple ones. How can I avoid this?
翻译

Android Developer
上午5:02
Perfect solution!!!!always was looking for something familiar as itsvpretty annoyable to let user choose one action from many for only one action!
翻译
发表评论…
id="hist_frame" name="hist_frame848832759" class="ss" tabindex="-1" style="height: 30px; left: -100px; position: absolute; top: -100px; width: 30px; font-family: Roboto, arial, sans-serif; font-size: 13px;">
翻译
加入 Google+
与合适的人分享合适的内容。

Android Developers
公开分享 - 2015年11月14日
Get rid of the app-selection dialog with Android App Links
+Wojtek Kaliciński
With Android Marshmallow we launched Android App Links, a better way to connect Android apps with their website counterparts.
App Links enable website owners to verify the linkage between their app and a domain that they control, so that when a user clicks a link to your site, Android can skip the app-selection dialog and proceed with opening the app directly.
There’s just a few things you need to do to enable App Links for your app:
1) add android:autoVerify="true" on one of your <intent-filter> tags that match web URLs
2) upload an assetlinks.json file with your certificate fingerprint to the /.well-known/assetlinks.json location on the web domains that you want to verify
3) install your APK on an Android Marshmallow emulator or device and test your App Links implementation
These steps, as well as the assetlinks.json format are explained in more detail in the DevByte ( https://goo.gl/6ixwJa) and documentation ( http://goo.gl/j3n9MD).
There are several caveats you need to be mindful of when implementing App Links:
App Links verification works per-app, not per <intent-filter>
As long as you have android:autoverify=”true” on even one <intent-filter>, all domains from all web intent filters in your manifest will be checked for a valid assetlinks.json file. If a single one of them fails, App Links will not be enabled for your app.
Please note that for an <intent-filter> to be considered for verification, it must declare an android:scheme value of http, https, or both. The filter must not declare any other schemes. The filter must also include the android.intent.action.VIEWaction and android.intent.category.BROWSABLE category.
Subdomains are treated as unique, separate hosts
If you want to use app links for subdomains, they must be explicitly listed in the <intent-filter> rules. You must also make sure that an assetlinks.json file is present on each subdomain. Unfortunately, HTTP 30x redirects are not supported at this time for App Links verification. There is however an include mechanism that you can use to point to another location if you want to reduce the amount of bookkeeping. Just put the following statement in your /.well-known/assetlinks.jsonfile and point it to a centralized configuration location:
[{ "include": " https://goo.gl/f5E2fv" }]
Note: HTTPS hosts can only include rules from another https:// URL.
If you find any blocking problems when implementing App Links, please sound off in the comments!
With Android Marshmallow we launched Android App Links, a better way to connect Android apps with their website counterparts.
App Links enable website owners to verify the linkage between their app and a domain that they control, so that when a user clicks a link to your site, Android can skip the app-selection dialog and proceed with opening the app directly.
There’s just a few things you need to do to enable App Links for your app:
1) add android:autoVerify="true" on one of your <intent-filter> tags that match web URLs
2) upload an assetlinks.json file with your certificate fingerprint to the /.well-known/assetlinks.json location on the web domains that you want to verify
3) install your APK on an Android Marshmallow emulator or device and test your App Links implementation
These steps, as well as the assetlinks.json format are explained in more detail in the DevByte ( https://goo.gl/6ixwJa) and documentation ( http://goo.gl/j3n9MD).
There are several caveats you need to be mindful of when implementing App Links:
App Links verification works per-app, not per <intent-filter>
As long as you have android:autoverify=”true” on even one <intent-filter>, all domains from all web intent filters in your manifest will be checked for a valid assetlinks.json file. If a single one of them fails, App Links will not be enabled for your app.
Please note that for an <intent-filter> to be considered for verification, it must declare an android:scheme value of http, https, or both. The filter must not declare any other schemes. The filter must also include the android.intent.action.VIEWaction and android.intent.category.BROWSABLE category.
Subdomains are treated as unique, separate hosts
If you want to use app links for subdomains, they must be explicitly listed in the <intent-filter> rules. You must also make sure that an assetlinks.json file is present on each subdomain. Unfortunately, HTTP 30x redirects are not supported at this time for App Links verification. There is however an include mechanism that you can use to point to another location if you want to reduce the amount of bookkeeping. Just put the following statement in your /.well-known/assetlinks.jsonfile and point it to a centralized configuration location:
[{ "include": " https://goo.gl/f5E2fv" }]
Note: HTTPS hosts can only include rules from another https:// URL.
If you find any blocking problems when implementing App Links, please sound off in the comments!
79
29




3 条评论

Liran Barsisa
上午1:27
+
3
4
3
4
3
I have a question about this as a user: What if I do want to open the link on the web browser? Many times, the website has more features than the app, and also allows to copy text easily.
Even more than that: It seems that for the new "default apps" feature (which is similar to here), when I as a developer query all apps that can handle the intent, I get a single item instead of multiple ones. How can I avoid this?
Even more than that: It seems that for the new "default apps" feature (which is similar to here), when I as a developer query all apps that can handle the intent, I get a single item instead of multiple ones. How can I avoid this?
翻译

Android Developer
上午5:02
Perfect solution!!!!always was looking for something familiar as itsvpretty annoyable to let user choose one action from many for only one action!
翻译
发表评论…