Android Setup

Once you have installed Voltra for Android, configure the Expo plugin and use @use-voltra/android for widget JSX.

1. Configure the Expo Plugin

Add @use-voltra/android-client to your app.json or app.config.js:

{
  "expo": {
    "plugins": [
      [
        "@use-voltra/android-client",
        {
          "enableNotifications": true,
          "widgets": [
            {
              "id": "my_widget",
              "displayName": "My First Widget",
              "description": "A simple Voltra widget",
              "targetCellWidth": 2,
              "targetCellHeight": 2
            }
          ]
        }
      ]
    ]
  }
}

See Plugin Configuration for all options.

2. Prebuild for Android

Update your native Android project:

npm
yarn
pnpm
bun
npx expo prebuild --platform android

3. Run the app

npx expo run:android

Your widget should now be available in the Android widget picker!

Need React or React Native expertise you can count on?