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 app details by package name
const androidAppInfo = await box.app.getInfo("com.android.chrome"); // package name
console.log(`Android App: ${JSON.stringify(androidAppInfo, null, 2)}`);
// Get app operator for interaction capabilities
const androidApp = await box.app.get("com.android.chrome");
// Open the app
await androidApp.open();
}
main();