Changes

Jump to: navigation, search

A Kotlin Android Studio App Links Tutorial

348 bytes added, 19:37, 29 November 2017
no edit summary
The goal of this chapter is to provide a practical demonstration of both Android app links and the Android Studio App Link Link Assistant.
This chapter will add app linking support to an existing Android app, allowing an activity to be launched via an app link URL. In addition to launching the activity, the content displayed will be specified within the path of the URL.
| personal || Boolean || Indicates whether the record is personal or public. This value is set to true for all records added by the user. Existing records provided with the database are set to false.
|}
 

== Loading and Running the Project ==
[[File:app_linking_app_running.png]]

[[File:app_linking_landmark_screen.png]]

[[File:app_links_assistant.png]]

[[File:app_linking_url_mapping.png]]

The Path menu (B) provides the following three path matching options:
* '''path ''' – The URL must match the path component of the URL exactly in order to launch the activity. If the path is set to /landmarks, for example, http://www.example.com/landmarks will be considered a match. A URL of http://www.example.com/landmarks/londonbridge, however, will not be considered a match.
* '''pathPrefix ''' – The specified path is only considered as the prefix. Additional path components may be included after the /landmarks component (for example http://www.example.com/landmarks/londonbridge will still be considered a match).
* '''pathPattern ''' – Allows the path to be specified using pattern matching in the form of basic regular expressions and wildcards, for example landmarks/*/[l-L]ondon/*
Since the path in this example is a prefix to the landmark ID component, select the pathPrefix menu option.
[[File:app_links_map_url.png]]

[[File:app_links_check_url.png]]
[[File:app_links_intent_filter.png]]
[[File:app_links_insert_code.png]]
[[File:app_links_run_test.png]]
[[File:app_links_choose_launcher.png]]

[[File:app_linking_asset_link_generator.png]]

[[File:app_links_digital_assets_file_preview.png]]

Navigation menu