パッケージを構成に関連付ける
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
1 つ以上のパッケージを構成に関連付けることで、OTA を
その設定に関連付けられた
デバイスを表示できますパッケージはすべて同じターゲットを使用する必要があります。
ビルドのフィンガープリント。
パッケージを構成に関連付ける最も簡単な方法は、次の API リクエストを発行することです。
- <ph type="x-smartling-placeholder"></ph>を手に入れましょう
すべてのパッケージのリストを取得します。
GET /v1/deployments/$deploymentName/packages HTTP/1.1
Host: androidovertheair.googleapis.com
...
{
"packages": [
{
"name": "bb3f51c1271.zip",
"title": "test zip"
},
{
"name": "6152c380bd6.zip",
"title": "package_2.zip"
}
]
}
- <ph type="x-smartling-placeholder"></ph>を手に入れましょう
更新する構成のパッケージ リスト。このリストには
現在構成に関連付けられているすべてのパッケージです。なお、Terraform 構成ファイルは
キーが必要です。構成キーが不明な場合は、まず
構成を一覧表示
入手する必要があります。
GET /v1/deployments/$deploymentName/configs/$configName/packages HTTP/1.1
Host: androidovertheair.googleapis.com
...
{
"configs": [
{
"packageName": "0908bf7b1b70b3245bb3f51c1271.zip",
"downloadOptions": {
"downloadType": "NORMAL"
}
}
]
}
- 作成:
PackageConfig
ステップ 2 で取得したリストに追加して、
updatePackages
新しいリストで結合します
PUT /v1/deployments/$deploymentName/configs/$configName/packages HTTP/1.1
Host: androidovertheair.googleapis.com
...
{
"configs": [
{
"packageName": "0908bf7b1b70b3245bb3f51c1271.zip",
"downloadOptions": {
"downloadType": "NORMAL"
}
},
{
"packageName": "bb3f51c1271.zip",
"downloadOptions": {
"downloadType": "NORMAL"
}
}
]
}
構成からパッケージを削除するには、上記の手順に沿って操作しますが、その際にパッケージを削除します。
updatePackages
の呼び出しから取得できます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eAssociating packages with a configuration enables OTA delivery to devices under that configuration, requiring all packages to share the same target build fingerprint.\u003c/p\u003e\n"],["\u003cp\u003ePackages are associated with a configuration using three API requests: listing all deployment packages, getting the current package list for the config, and updating the config's package list with desired additions or removals.\u003c/p\u003e\n"],["\u003cp\u003eTo add a package, retrieve the config's current package list, append the new package information, and update the config with the modified list using the \u003ccode\u003eupdatePackages\u003c/code\u003e API call.\u003c/p\u003e\n"],["\u003cp\u003eRemoving a package follows a similar process, but instead of adding, the target package is removed from the config's package list before the \u003ccode\u003eupdatePackages\u003c/code\u003e call.\u003c/p\u003e\n"]]],["Associating packages with a configuration enables OTA delivery to associated devices, ensuring all packages share the same target build fingerprint. This involves three API requests: listing all deployment packages via `GET /v1/deployments/$deploymentName/packages`, retrieving the existing package list for a specific config via `GET /v1/deployments/$deploymentName/configs/$configName/packages`, and finally, updating the configuration's package list by adding or removing a PackageConfig through `PUT /v1/deployments/$deploymentName/configs/$configName/packages`. Removing a package follows the same steps, omitting the package from the update call.\n"],null,["# Associate a Package with a Config\n\nAssociating one or more packages with a configuration allows those OTAs to be delivered to the\ndevices associated with that config. Note that the packages must all use the same target\nbuild fingerprint.\n\n\nThe simplest way to associate packages with a config is to issue the following API requests.\n\n1. Get a [list of all packages](/android/over-the-air/reference/rest/v1/deployments.packages/list) in the deployment. \n\n ```carbon\n GET /v1/deployments/$deploymentName/packages HTTP/1.1\n Host: androidovertheair.googleapis.com\n ...\n {\n \"packages\": [\n {\n \"name\": \"bb3f51c1271.zip\",\n \"title\": \"test zip\"\n },\n {\n \"name\": \"6152c380bd6.zip\",\n \"title\": \"package_2.zip\"\n }\n ]\n }\n \n ```\n2. Get a [package list](/android/over-the-air/reference/rest/v1/deployments.configs.packages/list) for the config you want to update. This list contains the all the packages currently associated with the configuration. Note that you must know the config key in order to make this call. If you don't know the config key, you must first [list the configs](/android/over-the-air/reference/rest/v1/deployments/list) to get it. \n\n ```gdscript\n GET /v1/deployments/$deploymentName/configs/$configName/packages HTTP/1.1\n Host: androidovertheair.googleapis.com\n ...\n {\n \"configs\": [\n {\n \"packageName\": \"0908bf7b1b70b3245bb3f51c1271.zip\",\n \"downloadOptions\": {\n \"downloadType\": \"NORMAL\"\n }\n }\n ]\n }\n \n ```\n3. Create a [PackageConfig](/android/over-the-air/reference/rest/v1/deployments.configs.packages#PackageConfig) and add it to the list you obtained in step 2 and call [updatePackages](/android/over-the-air/reference/rest/v1/deployments.configs/updatePackages) with that new list. \n\n ```gdscript\n PUT /v1/deployments/$deploymentName/configs/$configName/packages HTTP/1.1\n Host: androidovertheair.googleapis.com\n ...\n {\n \"configs\": [\n {\n \"packageName\": \"0908bf7b1b70b3245bb3f51c1271.zip\",\n \"downloadOptions\": {\n \"downloadType\": \"NORMAL\"\n }\n },\n {\n \"packageName\": \"bb3f51c1271.zip\",\n \"downloadOptions\": {\n \"downloadType\": \"NORMAL\"\n }\n }\n ]\n }\n \n ```\n\n\nTo remove a package from a config, you can follow the above steps but you remove the package\nfrom the `updatePackages` call rather than adding one."]]