Từ tài liệu chính thức:
Để kích hoạt Google thu thập nội dung ứng dụng của bạn và cho phép người dùng nhập vào ứng dụng của bạn từ kết quả tìm kiếm, bạn phải thêm bộ lọc ý định cho các hoạt động có liên quan trong manifest ứng dụng của bạn. Các bộ lọc ý định này cho phép liên kết sâu đến nội dung trong bất kỳ hoạt động nào của bạn. Ví dụ: người dùng có thể nhấp vào liên kết sâu để xem trang trong ứng dụng mua sắm mô tả sản phẩm cung cấp mà người dùng đang tìm kiếm.
Sử dụng liên kết này Enabling Deep Links for App Content bạn sẽ thấy cách sử dụng.
Và sử dụng Test Your App Indexing Implementation cách kiểm tra nó.
Đoạn mã XML sau đây cho biết cách bạn có thể chỉ định bộ lọc ý định trong tệp kê khai để liên kết sâu.
<activity
android:name="com.example.android.GizmosActivity"
android:label="@string/title_gizmos" >
<intent-filter android:label="@string/filter_title_viewgizmos">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
<data android:scheme="http"
android:host="www.example.com"
android:pathPrefix="/gizmos" />
<!-- note that the leading "/" is required for pathPrefix-->
<!-- Accepts URIs that begin with "example://gizmos” -->
<data android:scheme="example"
android:host="gizmos" />
</intent-filter>
</activity>
Để kiểm tra qua cầu gỡ lỗi Android
$ adb shell am start
-W -a android.intent.action.VIEW
-d <URI> <PACKAGE>
$ adb shell am start
-W -a android.intent.action.VIEW
-d "example://gizmos" com.example.android
Nguồn
2015-12-19 08:30:51
có thể trùng lặp của [App là không lập chỉ mục bởi Google Search (android lint)] (https://stackoverflow.com/ câu hỏi/34173545/app-là-không-indexable-by-google-tìm-android-lint) –