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 Android pkg details by package name
const androidPkgInfo = await box.pkg.getInfo("com.android.chrome"); // package name
console.log(`Android Pkg: ${JSON.stringify(androidPkgInfo, null, 2)}`);
// Get pkg operator for interaction capabilities
const androidPkg = await box.pkg.get("com.android.chrome");
// Open the pkg
await androidPkg.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 Android pkg details by package name
android_pkg_info = box.pkg.get_info("com.android.chrome") # package name
print(f"Android Pkg: {android_pkg_info}")
# Get pkg operator for interaction capabilities
android_pkg = box.pkg.get("com.android.chrome") # package name
# Open the pkg
android_pkg.open()
if __name__ == "__main__":
main()curl --request GET \
--url https://gbox.ai/api/v1/boxes/{boxId}/android/packages/{packageName} \
--header 'Authorization: Bearer <token>'{
"name": "Google Voice",
"packageName": "com.google.android.apps.googlevoice",
"apkPath": "/data/app/com.google.android.apps.googlevoice-1/base.apk",
"version": "1.0.0",
"pkgType": "thirdParty",
"isRunning": false
}Android
Get pkg
GET
/
boxes
/
{boxId}
/
android
/
packages
/
{packageName}
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 Android pkg details by package name
const androidPkgInfo = await box.pkg.getInfo("com.android.chrome"); // package name
console.log(`Android Pkg: ${JSON.stringify(androidPkgInfo, null, 2)}`);
// Get pkg operator for interaction capabilities
const androidPkg = await box.pkg.get("com.android.chrome");
// Open the pkg
await androidPkg.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 Android pkg details by package name
android_pkg_info = box.pkg.get_info("com.android.chrome") # package name
print(f"Android Pkg: {android_pkg_info}")
# Get pkg operator for interaction capabilities
android_pkg = box.pkg.get("com.android.chrome") # package name
# Open the pkg
android_pkg.open()
if __name__ == "__main__":
main()curl --request GET \
--url https://gbox.ai/api/v1/boxes/{boxId}/android/packages/{packageName} \
--header 'Authorization: Bearer <token>'{
"name": "Google Voice",
"packageName": "com.google.android.apps.googlevoice",
"apkPath": "/data/app/com.google.android.apps.googlevoice-1/base.apk",
"version": "1.0.0",
"pkgType": "thirdParty",
"isRunning": false
}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"
Android app package name
Example:
"com.example.myapp"
Response
200 - application/json
Android pkg
Android pkg information
Android pkg name
Example:
"Google Voice"
Android package name
Example:
"com.google.android.apps.googlevoice"
Android apk path
Example:
"/data/app/com.google.android.apps.googlevoice-1/base.apk"
Android pkg version
Example:
"1.0.0"
system or thirdParty
Available options:
system, thirdParty Example:
"thirdParty"
Whether the pkg is currently running
Example:
false
Was this page helpful?