Cung cấp nhiều điểm truy cập vào trải nghiệm tức thì
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Cảnh báo: Google Play Instant sẽ không còn hoạt động nữa. Kể từ tháng 12 năm 2025, bạn sẽ không thể xuất bản Ứng dụng tức thì thông qua Google Play và tất cả API Instant của Dịch vụ Google Play sẽ không còn hoạt động. Play sẽ không còn phân phát Ứng dụng tức thì cho người dùng bằng bất kỳ cơ chế nào.
Chúng tôi thực hiện thay đổi này dựa trên ý kiến phản hồi của nhà phát triển và những khoản đầu tư liên tục của chúng tôi để cải thiện hệ sinh thái kể từ khi ra mắt Google Play Instant.
Để tiếp tục tối ưu hoá cho việc thu hút thêm người dùng, nhà phát triển nên chuyển hướng người dùng đến ứng dụng hoặc trò chơi thông thường của mình bằng đường liên kết sâu để chuyển hướng họ đến những hành trình hoặc tính năng cụ thể khi thích hợp.
Mỗi trải nghiệm tức thì có ít nhất một điểm truy cập, là một hoạt động duy nhất trong ứng dụng hoặc trò chơi của bạn. Nếu bạn muốn ứng dụng hoặc trò chơi của mình có nhiều điểm truy cập, thì mỗi hoạt động bắt đầu cần phải có thể định địa chỉ; tức là hoạt động đó cần tương ứng với một URL duy nhất.
Nếu các URL cho điểm truy cập trong một ứng dụng hoặc trò chơi tức thì dùng chung một miền, thì mỗi điểm truy cập cần tương ứng với một đường dẫn khác trong miền đó. Ví dụ: giả sử bạn đang tạo một ứng dụng chỉ đường có 3 điểm truy cập riêng biệt: tìm vị trí hiện tại, tìm kiếm nhà hàng lân cận và chia sẻ vị trí. Mỗi tính năng này tương ứng với các tài nguyên trong một miền web, "example.com". Để cung cấp một URL riêng biệt cho mỗi điểm truy cập, hãy chỉ định các đường dẫn khác nhau trong miền, như minh hoạ trong bảng sau.
Tính năng
URL
Công cụ tìm vị trí
http://example.com/finder
Nhà hàng lân cận
http://example.com/restaurants
Chia sẻ thông tin vị trí
http://example.com/share
Khai báo tiền tố đường dẫn URL
URL của một điểm truy cập có thể dùng chung tiền tố với URL của các điểm truy cập khác vào cùng một ứng dụng hoặc trò chơi. Trong trường hợp này, hãy chỉ định đường dẫn đầy đủ cho một điểm truy cập và tiền tố đường dẫn cho các điểm truy cập khác, như minh hoạ trong đoạn mã sau:
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# Provide multiple entry points into an instant experience\n\n**Warning:** Google Play Instant will no longer be available. Starting December 2025,\nInstant Apps cannot be published through Google Play, and all\n[Google Play services Instant APIs](https://developers.google.com/android/reference/com/google/android/gms/instantapps/package-summary)\nwill no longer work. Users will no longer be served Instant Apps by Play using any\nmechanism.\n\nWe're making this change based on developer feedback and our continuous investments\nto improve the ecosystem since the introduction of Google Play Instant.\n\nTo continue optimizing for user growth, we encourage developers to refer users to\ntheir regular app or game, using [deeplinks](https://support.google.com/googleplay/android-developer/answer/12463044)\nto redirect them to specific journeys or features when relevant.\n\nEach instant experience has at least one *entry point* , which is a single\nactivity within your app or game. If you want your app or game to have multiple\nentry points, each starting activity needs to be *addressable*; that is, it\nneeds to correspond to a unique URL.\n| **Note:** You cannot associate fragments with URLs. Additionally, you cannot launch these fragments independently of an activity.\n\nIf the URLs for the entry points in an instant app or game share a domain, each\nentry point needs to correspond to a different path within that domain. For\nexample, say you're creating a navigation app that should have three separate\nentry points: find current location, search for nearby restaurants, and share\nlocation. Each of these features corresponds to resources within a web domain,\n\"example.com\". To provide a unique URL for each entry point, specify different\npaths within the domain, as shown in the following table.\n| **Caution:** To help the system launch the correct activity for each entry point, make sure that your paths don't share a common prefix. For example, if you provided entry points containing the URLs \"http://example.com/check\" and \"http://example.com/checkout\", the system's behavior might be undefined.\n\n| Feature | URL |\n|--------------------|--------------------------------|\n| Location finder | http://example.com/finder |\n| Nearby restaurants | http://example.com/restaurants |\n| Share location | http://example.com/share |\n\nDeclare URL path prefixes\n-------------------------\n\nIt's possible for the URL of one entry point to share a prefix with the URLs of\nother entry points into the same app or game. In this case, specify the\nfull path for one entry point and the path prefix for the other entry points, as\nshown in the following code snippet:\n\nAndroidManifest.xml \n\n```xml\n\u003cmanifest\u003e\n \u003cactivity android:name=\".CatalogActivity\" \u003e\n \u003cintent-filter\u003e\n \u003c!-- List of items in the catalog. --\u003e\n \u003cdata android:path=\"/items\" /\u003e\n \u003c/intent-filter\u003e\n \u003c/activity\u003e\n \u003cactivity android:name=\".ItemActivity\" \u003e\n \u003cintent-filter\u003e\n \u003c!-- Information about a specific item in the catalog. --\u003e\n \u003cdata android:pathPrefix=\"/items/\" /\u003e\n \u003c/intent-filter\u003e\n\u003c/manifest\u003e\n```\n| **Note:** To match a `pathPrefix` filter, URLs must contain the path prefix in addition to at least one character following the prefix. Therefore, by following the logic in the preceding code snippet, the URL \"/items/\" would bring users to `CatalogActivity`."]]