> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gbox.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get pkg activities

> Retrieves the list of activities defined in a specific Android package



## OpenAPI

````yaml get /boxes/{boxId}/android/packages/{packageName}/activities
openapi: 3.0.0
info:
  title: GBOX Open API
  description: GBOX Open API Documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://gbox.ai/api/v1
    description: Production Server
security: []
tags: []
paths:
  /boxes/{boxId}/android/packages/{packageName}/activities:
    get:
      tags:
        - Android
      summary: Get pkg activities
      description: Retrieves the list of activities defined in a specific Android package
      operationId: AndroidController_getAndroidPkgActivities
      parameters:
        - name: boxId
          required: true
          in: path
          description: Box ID
          schema:
            example: c9bdc193-b54b-4ddb-a035-5ac0c598d32d
            type: string
        - name: packageName
          required: true
          in: path
          description: Android app package name
          schema:
            example: com.example.myapp
            type: string
      responses:
        '200':
          description: Android pkg activities
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AndroidPkgActivityList'
      security:
        - bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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();
        - lang: Python
          source: |-
            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()
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/gbox/gbox-sdk-go\"\n)\n\nfunc main() {\n\tgboxSDK := gbox.NewGboxSDK(os.Getenv(\"GBOX_API_KEY\")) // This is the default and can be omitted\n\n\t// Create Android box\n\tbox, err := gboxSDK.Create(context.Background(), gbox.CreateRequest{Type: \"android\"})\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to create box: %v\", err)\n\t}\n\n\t// Connect to Android app by package name\n\tandroidApp, err := box.App.Get(context.Background(), \"com.android.settings\") // package name\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to connect to Android app: %v\", err)\n\t}\n\n\t// List activities\n\tactivities, err := androidApp.ListActivities(context.Background())\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to list activities: %v\", err)\n\t}\n\n\tfmt.Println(activities)\n}"
components:
  schemas:
    AndroidPkgActivityList:
      type: object
      properties:
        data:
          description: Activity list
          example:
            - name: Settings
              className: com.android.settings.Settings
              packageName: com.android.settings
              isExported: true
              isMain: true
              isLauncher: true
            - name: About Phone
              className: com.android.settings.AboutPhone
              packageName: com.android.settings
              isExported: true
              isMain: false
              isLauncher: false
          type: array
          items:
            $ref: '#/components/schemas/AndroidPkgActivity'
      title: Android Pkg Activity List
      description: Android pkg activity list
      required:
        - data
    AndroidPkgActivity:
      type: object
      properties:
        name:
          type: string
          description: Activity name
          example: Settings
        className:
          type: string
          description: Activity class name
          example: com.android.settings.Settings
        packageName:
          type: string
          description: Activity package name
          example: com.android.settings
        isExported:
          type: boolean
          description: Activity class name
          example: com.android.settings.Settings
        isMain:
          type: boolean
          description: >-
            Whether the activity is the main activity. Main activity is the
            entry point of the pkg and is typically launched when the pkg is
            started.
          example: true
        isLauncher:
          type: boolean
          description: >-
            Whether the activity is a launcher activity. Launcher activities
            appear in the device's pkg launcher/home screen and can be directly
            launched by the user.
          example: true
      title: Android Pkg Activity
      description: Android pkg activity
      required:
        - name
        - className
        - packageName
        - isExported
        - isMain
        - isLauncher
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        Enter your API Key in the format: Bearer <token>. Get it from
        https://gbox.ai

````