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.
Để biết danh sách các phương thức cho tài nguyên này, hãy xem ở cuối trang.
Biểu diễn tài nguyên
Sự tồn tại của tài nguyên Lượt cài đặt cho biết rằng ứng dụng đã được cài đặt trên một thiết bị cụ thể (hoặc một lượt cài đặt đang chờ xử lý).
Bạn có thể dùng API để tạo tài nguyên cài đặt bằng phương thức cập nhật. Thao tác này sẽ kích hoạt lượt cài đặt ứng dụng thực tế trên thiết bị. Nếu người dùng chưa có quyền sử dụng ứng dụng, thì hệ thống sẽ cố gắng tạo một quyền. Nếu thao tác này không thành công (ví dụ: do ứng dụng không miễn phí và không có giấy phép nào), thì quá trình tạo bản cài đặt sẽ không thành công.
Bạn cũng có thể dùng API này để cập nhật một ứng dụng đã cài đặt. Nếu phương thức update được sử dụng cho một lượt cài đặt hiện có, thì ứng dụng sẽ được cập nhật lên phiên bản mới nhất hiện có.
Xin lưu ý rằng bạn không thể buộc cài đặt một phiên bản cụ thể của một ứng dụng: mã phiên bản ở chế độ chỉ có thể đọc.
Nếu người dùng tự cài đặt một ứng dụng (như doanh nghiệp cho phép), thì hệ thống sẽ tự động tạo lại một tài nguyên cài đặt và có thể là một tài nguyên quyền.
API này cũng có thể được dùng để xoá tài nguyên cài đặt, việc này sẽ kích hoạt việc xoá ứng dụng khỏi thiết bị. Xin lưu ý rằng việc xoá một lượt cài đặt sẽ không tự động xoá quyền tương ứng, ngay cả khi không còn lượt cài đặt nào. Tài nguyên cài đặt cũng sẽ bị xoá nếu người dùng tự gỡ cài đặt ứng dụng.
Trạng thái cài đặt. Trạng thái "installPending" có nghĩa là gần đây một yêu cầu cài đặt đã được thực hiện và đang được tải xuống thiết bị. Trạng thái "installed" có nghĩa là ứng dụng đã được cài đặt. Trường này ở chế độ chỉ đọc.
Các giá trị được chấp nhận là:
"installPending"
"installed"
kind
string
productId
string
Mã nhận dạng của sản phẩm cần cài đặt. Ví dụ: "app:com.google.android.gm".
versionCode
integer
Phiên bản của sản phẩm đã cài đặt. Đảm bảo chỉ thiết lập nếu trạng thái cài đặt là "installed".
Yêu cầu xoá một ứng dụng khỏi một thiết bị. Lệnh gọi đến get hoặc
list sẽ vẫn hiển thị ứng dụng là đã cài đặt trên thiết bị cho đến khi
nó thực sự sẽ bị xoá.
Yêu cầu cài đặt phiên bản mới nhất của ứng dụng vào một thiết bị. Nếu ứng dụng
đã được cài đặt, thì sẽ được cập nhật lên phiên bản mới nhất nếu
nếu cần.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eAn Installs resource signifies an app's installation status (installed or pending) on a device.\u003c/p\u003e\n"],["\u003cp\u003eThe API allows for app installation and updates, but installing specific app versions is not supported.\u003c/p\u003e\n"],["\u003cp\u003eDeleting an install resource removes the app from the device, but the entitlement might remain.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eget\u003c/code\u003e, \u003ccode\u003elist\u003c/code\u003e, and \u003ccode\u003eupdate\u003c/code\u003e methods are deprecated and will be inaccessible after September 30, 2025.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003einstallState\u003c/code\u003e property indicates the installation status, either \u003ccode\u003einstallPending\u003c/code\u003e or \u003ccode\u003einstalled\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Installs\n\n\u003cbr /\u003e\n\nFor a list of [methods](#methods) for this resource, see the end of this page.\n\nResource representations\n------------------------\n\nThe existence of an Installs resource indicates that an app is installed on a particular device (or that an install is pending). \n\nThe API can be used to create an install resource using the [update](/android/work/play/emm-api/v1/installs/update) method. This triggers the actual install of the app on the device. If the user does not already have an entitlement for the app, then an attempt is made to create one. If this fails (for example, because the app is not free and there is no available license), then the creation of the install fails. \n\nThe API can also be used to update an installed app. If the [update](/android/work/play/emm-api/v1/installs/update) method is used on an existing install, then the app will be updated to the latest available version. \n\nNote that it is not possible to force the installation of a specific version of an app: the version code is read-only. \n\nIf a user installs an app themselves (as permitted by the enterprise), then again an install resource and possibly an entitlement resource are automatically created. \n\nThe API can also be used to delete an install resource, which triggers the removal of the app from the device. Note that deleting an install does not automatically remove the corresponding entitlement, even if there are no remaining installs. The install resource will also be deleted if the user uninstalls the app themselves.\n\n```text\n{\n \"kind\": \"androidenterprise#install\",\n \"productId\": string,\n \"versionCode\": integer,\n \"installState\": string\n}\n```\n\n| Property name | Value | Description | Notes |\n|----------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `installState` | `string` | Install state. The state `\"installPending\"` means that an install request has recently been made and download to the device is in progress. The state `\"installed\"` means that the app has been installed. This field is read-only. \u003cbr /\u003e Acceptable values are: - \"`installPending`\" - \"`installed`\" | |\n| `kind` | `string` | | |\n| `productId` | `string` | The ID of the product that the install is for. For example, `\"app:com.google.android.gm\"`. | |\n| `versionCode` | `integer` | The version of the installed product. Guaranteed to be set only if the install state is `\"installed\"`. | |\n\nMethods\n-------\n\n[delete](/android/work/play/emm-api/v1/installs/delete)\n: Requests to remove an app from a device. A call to `get` or\n `list` will still show the app as installed on the device until\n it is actually removed.\n\n[get](/android/work/play/emm-api/v1/installs/get)\n:\n | **Deprecated:** New integrations cannot use this method and can refer to our [new\n | recommendations](/android/work/deprecations#recommended_alternative_3). \n | **This method will no longer be accessible by\n | anyone after September 30, 2025.**\n\n Retrieves details of an installation of an app on a device.\n\n[list](/android/work/play/emm-api/v1/installs/list)\n:\n | **Deprecated:** New integrations cannot use this method and can refer to our [new\n | recommendations](/android/work/deprecations#recommended_alternative_3). \n | **This method will no longer be accessible by\n | anyone after September 30, 2025.**\n\n Retrieves the details of all apps installed on the specified device.\n\n[update](/android/work/play/emm-api/v1/installs/update)\n:\n | **Deprecated:** New integrations cannot use this method and can refer to our [new\n | recommendations](/android/work/deprecations#recommended_alternative_3). \n | **This method will no longer be accessible by\n | anyone after September 30, 2025.**\n\n Requests to install the latest version of an app to a device. If the app\n is already installed, then it is updated to the latest version if\n necessary."]]