JavaScript
import GboxSDK from "gbox-sdk";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
// Create an Android box
const box = await gboxSDK.create({ type: "android" });
// Get basic app information (metadata only)
const androidAppListInfo = await box.app.listInfo();
console.log("App info:", androidAppListInfo);
// Get app operators for interaction capabilities
const androidAppList = await box.app.list();
// Iterate through each app operator and perform actions
for (const app of androidAppList.operators) {
console.log(`App data: ${JSON.stringify(app.data, null, 2)}`);
// Open the app using the operator
await app.open();
}
}
main();import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"]) # This is the default and can be omitted
# Create an Android box
box = gbox_sdk.create(type="android")
# Get basic app information (metadata only)
android_app_list_info = box.app.list_info()
print("App info:", android_app_list_info)
# Get app operators for interaction capabilities
android_app_list = box.app.list()
# Iterate through each app operator and perform actions
for app in android_app_list.operators:
print(f"App data: {app.data}")
# Open the app using the operator
app.open()
if __name__ == "__main__":
main()curl --request GET \
--url https://gbox.ai/api/v1/boxes/{boxId}/android/apps \
--header 'Authorization: Bearer <token>'{
"data": [
{
"packageName": "com.android.settings",
"activityName": "Settings",
"activityClassName": "com.android.settings.Settings"
},
{
"packageName": "com.android.chrome",
"activityName": "Chrome",
"activityClassName": "com.android.chrome.ChromeTabbedActivity"
}
]
}Android
List apps
List all installed apps on the launcher
GET
/
boxes
/
{boxId}
/
android
/
apps
JavaScript
import GboxSDK from "gbox-sdk";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
// Create an Android box
const box = await gboxSDK.create({ type: "android" });
// Get basic app information (metadata only)
const androidAppListInfo = await box.app.listInfo();
console.log("App info:", androidAppListInfo);
// Get app operators for interaction capabilities
const androidAppList = await box.app.list();
// Iterate through each app operator and perform actions
for (const app of androidAppList.operators) {
console.log(`App data: ${JSON.stringify(app.data, null, 2)}`);
// Open the app using the operator
await app.open();
}
}
main();import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"]) # This is the default and can be omitted
# Create an Android box
box = gbox_sdk.create(type="android")
# Get basic app information (metadata only)
android_app_list_info = box.app.list_info()
print("App info:", android_app_list_info)
# Get app operators for interaction capabilities
android_app_list = box.app.list()
# Iterate through each app operator and perform actions
for app in android_app_list.operators:
print(f"App data: {app.data}")
# Open the app using the operator
app.open()
if __name__ == "__main__":
main()curl --request GET \
--url https://gbox.ai/api/v1/boxes/{boxId}/android/apps \
--header 'Authorization: Bearer <token>'{
"data": [
{
"packageName": "com.android.settings",
"activityName": "Settings",
"activityClassName": "com.android.settings.Settings"
},
{
"packageName": "com.android.chrome",
"activityName": "Chrome",
"activityClassName": "com.android.chrome.ChromeTabbedActivity"
}
]
}Authorizations
Enter your API Key in the format: Bearer . Get it from https://gbox.ai
Path Parameters
Box ID
Example:
"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"
Response
200 - application/json
Android apps
Android app list
App list
Show child attributes
Show child attributes
Example:
[
{
"packageName": "com.android.settings",
"activityName": "Settings",
"activityClassName": "com.android.settings.Settings"
},
{
"packageName": "com.android.chrome",
"activityName": "Chrome",
"activityClassName": "com.android.chrome.ChromeTabbedActivity"
}
]
Was this page helpful?
⌘I