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() {
const box = await gboxSDK.create({ type: "android" });
const androidApp = await box.app.get("com.android.settings"); // package name
const activities = await androidApp.listActivities();
console.log(activities);
}
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 Android box
box = gbox_sdk.create(type="android")
# Connect to Android app by package name
android_app = box.app.get("com.android.settings") # package name
# List activities
activities = android_app.list_activities()
print(activities)
if __name__ == "__main__":
main()
Retrieves the list of activities defined in a specific Android package
GET
/
boxes
/
{boxId}
/
android
/
packages
/
{packageName}
/
activities
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() {
const box = await gboxSDK.create({ type: "android" });
const androidApp = await box.app.get("com.android.settings"); // package name
const activities = await androidApp.listActivities();
console.log(activities);
}
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 Android box
box = gbox_sdk.create(type="android")
# Connect to Android app by package name
android_app = box.app.get("com.android.settings") # package name
# List activities
activities = android_app.list_activities()
print(activities)
if __name__ == "__main__":
main()