Fornisci più punti di ingresso in un'esperienza istantanea
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Avviso:Google Play Instant non sarà più disponibile. A partire da dicembre 2025,
le app istantanee non potranno essere pubblicate tramite Google Play e tutte le
API istantanee di Google Play Services
non funzioneranno più. Gli utenti non riceveranno più app istantanee da Play utilizzando alcun
meccanismo.
Stiamo apportando questa modifica in base al feedback degli sviluppatori e ai nostri continui investimenti
per migliorare l'ecosistema dall'introduzione di Google Play Instant.
Per continuare a ottimizzare per la crescita degli utenti, invitiamo gli sviluppatori a indirizzare gli utenti alla loro app o al loro gioco normale utilizzando i deep link per reindirizzarli a percorsi o funzionalità specifici, se pertinenti.
Ogni esperienza istantanea ha almeno un punto di accesso, ovvero una singola
attività all'interno dell'app o del gioco. Se vuoi che la tua app o il tuo gioco abbia più
punti di accesso, ogni attività iniziale deve essere indirizzabile, ovvero
deve corrispondere a un URL univoco.
Se gli URL dei punti di accesso in un'app o un gioco istantaneo condividono un dominio, ogni
punto di accesso deve corrispondere a un percorso diverso all'interno di quel dominio. Ad esempio, supponiamo che tu stia creando un'app di navigazione che deve avere tre punti di ingresso separati: trova la posizione attuale, cerca ristoranti nelle vicinanze e condividi la posizione. Ciascuna di queste funzionalità corrisponde a risorse all'interno di un dominio web,
"example.com". Per fornire un URL univoco per ogni punto di ingresso, specifica percorsi diversi all'interno del dominio, come mostrato nella tabella seguente.
Funzionalità
URL
Localizzatore
http://example.com/finder
Ristoranti nelle vicinanze
http://example.com/restaurants
Condivisione della posizione
http://example.com/share
Dichiarare i prefissi del percorso URL
È possibile che l'URL di un punto di ingresso condivida un prefisso con gli URL di
altri punti di ingresso nella stessa app o nello stesso gioco. In questo caso, specifica il percorso completo per un punto di ingresso e il prefisso del percorso per gli altri punti di ingresso, come mostrato nel seguente snippet di codice:
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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`."]]