gbox_sdk.wrapper.box.android package¶
Submodules¶
gbox_sdk.wrapper.box.android.android module¶
gbox_sdk.wrapper.box.android.app_manager module¶
- class gbox_sdk.wrapper.box.android.app_manager.AndroidAppManager(client, box)¶
Bases:
object
Manager class for handling Android app operations within a box.
Provides methods to install, uninstall, list, retrieve, close, and backup Android apps.
- Attributes:
client (GboxClient): The API client used for communication. box (AndroidBox): The Android box data object.
- backup_all()¶
Backup all installed Android apps on the box.
- Return type:
BinaryAPIResponse
- Returns:
BinaryAPIResponse: The backup response containing binary data.
- close_all()¶
Close all running Android apps on the box.
- Return type:
None
- get(package_name)¶
Get an operator for a specific installed app.
- Return type:
- Args:
package_name (str): The package name of the app.
- Returns:
AndroidAppOperator: Operator for the specified app.
- get_info(package_name)¶
Get detailed information for a specific installed app.
- Return type:
- Args:
package_name (str): The package name of the app.
- Returns:
AndroidGetResponse: App information response.
- install(body)¶
Install an Android app on the box.
Supports multiple APK input formats: - Local file path: “/path/to/app.apk” - File URL: “file:///path/to/app.apk” - HTTP URL: “https://example.com/app.apk” - File object or stream
- Return type:
- Args:
body (AndroidInstall): Installation parameters, including APK path or URL.
- Returns:
AndroidAppOperator: Operator for the installed app.
- list()¶
List all installed Android apps as operator objects.
- Return type:
- Returns:
ListAndroidApp: Response containing app operator instances.
- list_info()¶
Get detailed information of all installed Android apps.
- Return type:
- Returns:
AndroidListAppResponse: Response containing app information.
- uninstall(package_name, params=None)¶
Uninstall an Android app from the box.
- Return type:
None
- Args:
package_name (str): The package name of the app to uninstall. params (AndroidUninstallParams): Uninstallation parameters.
gbox_sdk.wrapper.box.android.app_operator module¶
gbox_sdk.wrapper.box.android.pkg_manager module¶
- class gbox_sdk.wrapper.box.android.pkg_manager.AndroidPkgManager(client, box)¶
Bases:
object
Manager class for handling Android package operations within a box.
Provides methods to install, uninstall, list, retrieve, close, and backup Android packages.
- Attributes:
client (GboxClient): The API client used for communication. box (AndroidBox): The Android box data object.
- backup_all()¶
Backup all installed Android packages on the box.
- Return type:
BinaryAPIResponse
- Returns:
BinaryAPIResponse: The backup response containing binary data.
- close_all()¶
Close all running Android packages on the box.
- Return type:
None
- get(package_name)¶
Get an operator for a specific installed package.
- Return type:
- Args:
package_name (str): The package name of the app.
- Returns:
AndroidPkgOperator: Operator for the specified package.
- get_info(package_name)¶
Get detailed information for a specific installed package.
- Return type:
- Args:
package_name (str): The package name of the app.
- Returns:
AndroidGetResponse: Package information response.
- install(body)¶
Install an Android package on the box.
- Return type:
- Args:
body (AndroidInstall): Installation parameters, including APK path or URL.
- Returns:
AndroidInstallResponse: The response of the install operation.
- list(params=None)¶
List all installed Android packages as operator objects.
- Return type:
- Args:
params (AndroidListPkgParams, optional): Parameters for listing packages.
- Returns:
ListAndroidPkg: Response containing package operator instances.
- list_info(params=None)¶
Get detailed information of all installed Android packages.
- Return type:
- Args:
params (AndroidListPkgParams, optional): Parameters for listing packages.
- Returns:
AndroidListPkgResponse: Response containing package information.
- list_simple_info(params=None)¶
List all installed Android packages with simple information.
- Return type:
- Returns:
ListAndroidPkgResponse: Response containing package information.
- uninstall(package_name, params=None)¶
Uninstall an Android package from the box.
- Return type:
None
- Args:
package_name (str): The package name of the app to uninstall. params (AndroidUninstall, optional): Uninstallation parameters.
gbox_sdk.wrapper.box.android.pkg_operator module¶
gbox_sdk.wrapper.box.android.types module¶
- class gbox_sdk.wrapper.box.android.types.AndroidUninstall¶
Bases:
TypedDict
Parameters for uninstalling an Android package (without box_id).
-
keep_data:
Annotated
[bool
]¶ uninstalls the pkg while retaining the data/cache
-
keep_data:
- class gbox_sdk.wrapper.box.android.types.InstallAndroidAppByLocalFile¶
Bases:
TypedDict
-
apk:
Required
[str
]¶
-
apk:
- class gbox_sdk.wrapper.box.android.types.ListAndroidApp(operators)¶
Bases:
object
Response type for listing Android apps as operators.
- class gbox_sdk.wrapper.box.android.types.ListAndroidPkg(operators)¶
Bases:
object
Response type for listing Android packages as operators.
Module contents¶
- class gbox_sdk.wrapper.box.android.AndroidAppManager(client, box)¶
Bases:
object
Manager class for handling Android app operations within a box.
Provides methods to install, uninstall, list, retrieve, close, and backup Android apps.
- Attributes:
client (GboxClient): The API client used for communication. box (AndroidBox): The Android box data object.
- backup_all()¶
Backup all installed Android apps on the box.
- Return type:
BinaryAPIResponse
- Returns:
BinaryAPIResponse: The backup response containing binary data.
- close_all()¶
Close all running Android apps on the box.
- Return type:
None
- get(package_name)¶
Get an operator for a specific installed app.
- Return type:
- Args:
package_name (str): The package name of the app.
- Returns:
AndroidAppOperator: Operator for the specified app.
- get_info(package_name)¶
Get detailed information for a specific installed app.
- Return type:
- Args:
package_name (str): The package name of the app.
- Returns:
AndroidGetResponse: App information response.
- install(body)¶
Install an Android app on the box.
Supports multiple APK input formats: - Local file path: “/path/to/app.apk” - File URL: “file:///path/to/app.apk” - HTTP URL: “https://example.com/app.apk” - File object or stream
- Return type:
- Args:
body (AndroidInstall): Installation parameters, including APK path or URL.
- Returns:
AndroidAppOperator: Operator for the installed app.
- list()¶
List all installed Android apps as operator objects.
- Return type:
- Returns:
ListAndroidApp: Response containing app operator instances.
- list_info()¶
Get detailed information of all installed Android apps.
- Return type:
- Returns:
AndroidListAppResponse: Response containing app information.
- uninstall(package_name, params=None)¶
Uninstall an Android app from the box.
- Return type:
None
- Args:
package_name (str): The package name of the app to uninstall. params (AndroidUninstallParams): Uninstallation parameters.
- class gbox_sdk.wrapper.box.android.AndroidAppOperator(client, box, data)¶
Bases:
object
Operator class for managing a specific Android app within a box.
Provides methods to open, restart, close, list activities, and backup the app.
- Attributes:
client (GboxClient): The API client used for communication. box (AndroidBox): The Android box data object. data (AndroidApp): The app data object.
- backup()¶
Backup the app.
- Return type:
BinaryAPIResponse
- Returns:
BinaryAPIResponse: The backup response containing binary data.
- close()¶
Close the app.
- Return type:
None
- list_activities()¶
List all activities of the app.
- Return type:
- Returns:
AndroidListActivitiesResponse: The response containing the list of activities.
- open(activity_name=None)¶
Open the app, optionally specifying an activity name.
- Return type:
None
- Args:
activity_name (str, optional): The activity name to open. Defaults to None.
- restart(activity_name=None)¶
Restart the app, optionally specifying an activity name.
- Return type:
None
- Args:
activity_name (str, optional): The activity name to restart. Defaults to None.
- class gbox_sdk.wrapper.box.android.AndroidBoxOperator(client, data)¶
Bases:
BaseBox
Operator class for managing Android boxes, providing access to app and package management functionalities.
- Attributes:
app (AndroidAppManager): Manager for Android app operations. pkg (AndroidPkgManager): Manager for Android package operations.
- class gbox_sdk.wrapper.box.android.AndroidPkgManager(client, box)¶
Bases:
object
Manager class for handling Android package operations within a box.
Provides methods to install, uninstall, list, retrieve, close, and backup Android packages.
- Attributes:
client (GboxClient): The API client used for communication. box (AndroidBox): The Android box data object.
- backup_all()¶
Backup all installed Android packages on the box.
- Return type:
BinaryAPIResponse
- Returns:
BinaryAPIResponse: The backup response containing binary data.
- close_all()¶
Close all running Android packages on the box.
- Return type:
None
- get(package_name)¶
Get an operator for a specific installed package.
- Return type:
- Args:
package_name (str): The package name of the app.
- Returns:
AndroidPkgOperator: Operator for the specified package.
- get_info(package_name)¶
Get detailed information for a specific installed package.
- Return type:
- Args:
package_name (str): The package name of the app.
- Returns:
AndroidGetResponse: Package information response.
- install(body)¶
Install an Android package on the box.
- Return type:
- Args:
body (AndroidInstall): Installation parameters, including APK path or URL.
- Returns:
AndroidInstallResponse: The response of the install operation.
- list(params=None)¶
List all installed Android packages as operator objects.
- Return type:
- Args:
params (AndroidListPkgParams, optional): Parameters for listing packages.
- Returns:
ListAndroidPkg: Response containing package operator instances.
- list_info(params=None)¶
Get detailed information of all installed Android packages.
- Return type:
- Args:
params (AndroidListPkgParams, optional): Parameters for listing packages.
- Returns:
AndroidListPkgResponse: Response containing package information.
- list_simple_info(params=None)¶
List all installed Android packages with simple information.
- Return type:
- Returns:
ListAndroidPkgResponse: Response containing package information.
- uninstall(package_name, params=None)¶
Uninstall an Android package from the box.
- Return type:
None
- Args:
package_name (str): The package name of the app to uninstall. params (AndroidUninstall, optional): Uninstallation parameters.
- class gbox_sdk.wrapper.box.android.AndroidPkgOperator(client, box, data)¶
Bases:
object
Operator class for managing a specific Android package within a box.
Provides methods to open, close, restart, list activities, and backup the package.
- Attributes:
client (GboxClient): The API client used for communication. box (AndroidBox): The Android box data object. data (AndroidGetResponse): The package data object.
- backup()¶
Backup the package.
- Return type:
BinaryAPIResponse
- Returns:
BinaryAPIResponse: The backup response containing binary data.
- close()¶
Close the package.
- Return type:
None
- list_activities()¶
List all activities of the package.
- Return type:
- Returns:
AndroidListActivitiesResponse: The response containing the list of activities.
- open(activity_name=None)¶
Open the package, optionally specifying an activity name.
- Return type:
None
- Args:
activity_name (str, optional): The activity name to open. Defaults to None.
- restart(activity_name=None)¶
Restart the package, optionally specifying an activity name.
- Return type:
None
- Args:
activity_name (str, optional): The activity name to restart. Defaults to None.