[null,null,["最后更新时间 (UTC):2023-11-26。"],[],[],null,["# Linking to Google Play\n\nGoogle Play provides several link formats that let you bring users to your\nproducts in the way you want, from Android apps, web pages, ads, reviews,\narticles, social media posts, and more.\n| To link to your app with the Google Play badge, visit the [badge generator](/distribute/tools/promote/badges).\n\nThe link formats let you link to the following:\n\n- An app's [store listing](#OpeningDetails).\n- A [developer's page](#OpeningPublisher).\n- A [search result](#PerformingSearch) of your choice.\n- A [collection](#OpeningCollection).\n- A [Google Play Instant experience](#Instant).\n\nLinking to a store listing\n--------------------------\n\nUse the format below to deep-link directly to an app's Store listing page, where\nusers can see the app description, screenshots, reviews and more, and then\ninstall it.\n\nTo create the link, you need to know the app's fully qualified *package name* ,\nwhich is declared in the app's [manifest\nfile](/guide/topics/manifest/manifest-element#package). The package name is\nalso visible in the Google Play Console. \n\n https://play.google.com/store/apps/details?id=\u003cpackage_name\u003e\n\nHere's an example: \n\n```\nhttp://play.google.com/store/apps/details?id=com.google.android.apps.maps\n```\n\nFor details on how to send the link in an Android app, see [Linking from an\nAndroid App](#android-app).\n\nLinking to a developer page\n---------------------------\n\nUse the format below to link users to your [developer page](https://support.google.com/googleplay/android-developer/answer/6226441). On this page you can provide more details about your brand,\nfeature an app, and provide a list of other apps you've published.\n\nTo create the link, you need to know your *publisher name*, which is available\nfrom the Play Console. \n\n https://play.google.com/store/apps/dev?id=\u003cdeveloper_id\u003e\n\nHere's an example: \n\n```\nhttps://play.google.com/store/apps/dev?id=5700313618786177705\n```\n\nFor details on how to send the link in an Android app, see [Linking from an\nAndroid App](#android-app).\n\nLinking to a search result\n--------------------------\n\nUse the format below to link users to a search query result on Google Play. The\nsearch result page shows a list of apps (and optionally other content) that\nmatch the query, with ratings, badges, and an install button for each.\n\nTo create the link, you just need a search query string. If you want the query\nto search beyond the Google Play app listings, remove the `&c=apps` part of the\nlink URL. \n\n https://play.google.com/store/search?q=\u003csearch_query\u003e&c=apps\n\nHere's an example: \n\n```\nhttps://play.google.com/store/search?q=maps&c=apps\n```\n\nFor details on how to send the link in an Android app, see [Linking from an\nAndroid App](#android-app).\n\nLinking to a collection\n-----------------------\n\nIf your app is featured or appears in one of the Google Play top charts or\ncollections, you can use the format below to link users directly to the\ncollection. The collection shows a ranked list of apps in the collection, with\nratings, short descriptions, and an install button. \n\n https://play.google.com/store/apps/collection/\u003ccollection_name\u003e\n\nHere's an example: \n\n```\nhttps://play.google.com/store/apps/collection/topselling_free\n```\n\nFor details on how to send the link in an Android app, see [Linking from an\nAndroid App](#android-app).\n\n\n**Table 1.** Collections on Google Play.\n\n| Collection | collection_name |\n|------------------------|---------------------|\n| Staff Picks (Featured) | featured |\n| Top Paid | topselling_paid |\n| Top Free | topselling_free |\n| Top New Free | topselling_new_free |\n| Top New Paid | topselling_new_paid |\n| Top Grossing | topgrossing |\n| Trending | movers_shakers |\n\nLinking to Editors' Choice Pages\n--------------------------------\n\nIf your app is featured or appears in articles in Editors' Choice, you can use\nthe format below to link users directly to the Editors' Choice page.\n\nThe URL for the main Editors' Choice page is: \n\n```\nhttps://play.google.com/store/apps/topic?id=editors_choice\n```\n\nAnd you can find each page's URL from the Editors' Choice page.\n\nHere are some examples:\n\n- [**Get Motivated With These 5 Fitness Apps**\n `https://play.google.com/store/apps/topic?id=editorial_fitness_apps_us`](https://play.google.com/store/apps/topic?id=editorial_fitness_apps_us)\n- [**Map It Out: Navigate Anywhere With These 5 Apps**\n `https://play.google.com/store/apps/topic?id=editorial_navigation_apps_us`](https://play.google.com/store/apps/topic?id=editorial_navigation_apps_us)\n- [**Winning Sports Games to Enjoy Any Season**\n `https://play.google.com/store/apps/topic?id=editorial_sports_games_us`](https://play.google.com/store/apps/topic?id=editorial_sports_games_us)\n\nLinking from an Android App\n---------------------------\n\nIf you want to link to your products from an Android app, create an\n[`Intent`](/reference/android/content/Intent) that opens a URL. As you\nconfigure this intent, pass `\"com.android.vending\"` into `Intent.setPackage()`\nso that users see your app's details in the Google Play Store app instead of a\n[chooser](/training/basics/intents/sending#AppChooser).\n\nThe following example directs users to viewing the app containing the package\nname `com.example.android` in Google Play: \n\n### Kotlin\n\n```kotlin\nval intent = Intent(Intent.ACTION_VIEW).apply {\n data = Uri.parse(\n \"https://play.google.com/store/apps/details?id=com.example.android\")\n setPackage(\"com.android.vending\")\n}\nstartActivity(intent)\n```\n\n### Java\n\n```java\nIntent intent = new Intent(Intent.ACTION_VIEW);\nintent.setData(Uri.parse(\n \"https://play.google.com/store/apps/details?id=com.example.android\"));\nintent.setPackage(\"com.android.vending\");\nstartActivity(intent);\n```\n\nLaunching a Google Play Instant experience\n------------------------------------------\n\nIf you have published an instant app using\n[Google Play Instant](/topic/google-play-instant), you can\nlaunch the app as follows: \n\n### Kotlin\n\n```kotlin\nval uriBuilder = Uri.parse(\"https://play.google.com/store/apps/details\")\n .buildUpon()\n .appendQueryParameter(\"id\", \"com.example.android\")\n .appendQueryParameter(\"launch\", \"true\")\n\n// Optional parameters, such as referrer, are passed onto the launched\n// instant app. You can retrieve these parameters using Activity.intent.data.\nuriBuilder.appendQueryParameter(\"referrer\", \"exampleCampaignId\")\n\nval intent = Intent(Intent.ACTION_VIEW).apply {\n data = uriBuilder.build()\n setPackage(\"com.android.vending\")\n}\nstartActivity(intent)\n```\n\n### Java\n\n```java\nIntent intent = new Intent(Intent.ACTION_VIEW);\nUri.Builder uriBuilder = Uri.parse(\"market://launch\")\n .buildUpon()\n .appendQueryParameter(\"id\", \"com.example.android\");\n\n// Optional parameters, such as referrer, are passed onto the launched\n// instant app. You can retrieve these parameters using\n// Activity.getIntent().getData().\nuriBuilder.appendQueryParameter(\"referrer\", \"exampleCampaignId\");\n\nintent.setData(uriBuilder.build());\nintent.setPackage(\"com.android.vending\");\nstartActivity(intent);\n```\n| **Note:** If Google Play Instant isn't enabled on the device, the store listing is shown.\n\nSummary of URL formats\n----------------------\n\nThe table below provides a summary of the URIs currently supported by the Google\nPlay (both on the web and in an Android application), as discussed in the\nprevious sections.\n\n| For this result | Use this link |\n|--------------------------------------------------|-------------------------------------------------------------------|\n| Show the store listing for a specific app | `https://play.google.com/store/apps/details?id=\u003cpackage_name\u003e` |\n| Show the developer page for a specific publisher | `https://play.google.com/store/apps/dev?id=\u003cdeveloper_id\u003e` |\n| Show the result of a search query | `https://play.google.com/store/search?q=\u003cquery\u003e` |\n| Show an app collection | `https://play.google.com/store/apps/collection/\u003ccollection_name\u003e` |\n| Launch a Google Play Instant experience | `market://launch?id=\u003cpackage_name\u003e` |"]]