# Flutter Android >[!IMPORTANT] >Flutter is supported by our track events only solution. The codeless solution is still in progress. >[!IMPORTANT] >Requirements: >- Flutter 3.3 and above >- Dart 2.18 and above ## Step 1. Install Pendo SDK 1. In the **application folder**, run the following command: ```shell flutter pub add pendo_sdk ``` 2. In the application **android/build.gradle** file: - Add the Pendo Repository to the repositories section: ```java repositories { maven { url "https://software.mobile.pendo.io/artifactory/androidx-release" } mavenCentral() } ``` - Minimum and compile SDK Version: If applicable, set your app to be compiled with **compileSdkVersion 33** or higher and **minSdkVersion 21** or higher: ```java android { minSdkVersion 21 compileSdkVersion 33 } ``` 3. In the application **AndroidManifest.xml** file: Add the following `` to the manifest in the `` tag: ```xml ``` 4. Using ProGuard / R8 - If you are using **ProGuard**, the rules that need to be added to ProGuard can be found here: [pendo-proguard.cfg](/android/pnddocs/pendo-proguard.cfg). - If you are using **ProGuard(D8/DX only)** to perform compile-time code optimization, and have `{Android SDK Location}/tools/proguard/proguard-android-optimize.txt`, add `!code/allocation/variable` to the `-optimizations` line in your `app/proguard-rules.pro` file. The optimizations line should look like this: `-optimizations *other optimizations*,!code/allocation/variable` ## Step 2. Pendo SDK integration >[!NOTE] >The `API Key` can be found in your Pendo Subscription Settings in App Details. In the application **main file (lib/main.dart)**, add the following code: ```dart import 'package:pendo_sdk/pendo_sdk.dart'; ``` 1. Add the following code in the `initState` method: ```dart var pendoKey = 'YOUR_API_KEY_HERE'; await PendoSDK.setup(pendoKey); ``` 2. Initialize Pendo where your visitor is being identified (e.g. login, register, etc.). ```dart final String visitorId = 'VISITOR-UNIQUE-ID'; final String accountId = 'ACCOUNT-UNIQUE-ID'; final Map visitorData = {'Age': '25', 'Country': 'USA'}; final Map accountData = {'Tier': '1', 'Size': 'Enterprise'}; await PendoSDK.startSession(visitorId, accountId, visitorData, accountData); ``` **Notes:** **visitorId**: a user identifier (e.g. John Smith) **visitorData**: the user metadata (e.g. email, phone, country, etc.) **accountId**: an affiliation of the user to a specific company or group (e.g. Acme inc.) **accountData**: the account metadata (e.g. tier, level, ARR, etc.) >[!TIP] >To begin a session for an anonymous visitor, pass ```null``` or an empty string ```''``` as the visitor id. You can call the `startSession` API more than once and transition from an anonymous session to an identified session (or even switch between multiple identified sessions). 3. Track events Configure Pendo Track Events to capture analytics to notify Pendo of analytics events. In the application files where you want to track an event, add the following code: ```dart import 'package:pendo_sdk/pendo_sdk.dart'; ``` ```dart await PendoSDK.track('name', { 'firstProperty': 'firstPropertyValue', 'secondProperty': 'secondPropertyValue'}); ``` ## Step 3. Mobile device connectivity for testing >[!NOTE] >The `Scheme ID` can be found in your Pendo Subscription Settings in App Details. This step enables guide testing capabilities. Add the following **activity** to the application **AndroidManifest.xml** in the `` tag: ```xml ``` ## Step 4. Verify installation 1. Test using Android Studio: Run the app while attached to the Android Studio. Review the Android Studio logcat and look for the following message: `Pendo SDK was successfully integrated and connected to the server.` 2. In the Pendo UI, go to Settings>Subscription Settings. 3. Select the **Applications** tab and then your application. 4. Select the Install Settings tab and follow the instructions under Verify Your Installation to ensure you have successfully integrated the Pendo SDK. 5. Confirm that you can see your app as Integrated under subscription settings. ## Limitations - Flutter is currently only supported by our [Track Events solution](https://support.pendo.io/hc/en-us/articles/360061487572-Pendo-for-Mobile-Track-Events-Solution). - To support hybrid mode in Flutter, please open a ticket. ## Developer documentation - API documentation available [here](/api-documentation/flutter-apis.md). ## Troubleshooting - For technical issues, please [review open issues](https://github.com/pendo-io/pendo-mobile-sdk/issues) or [submit a new issue](https://github.com/pendo-io/pendo-mobile-sdk/issues). - Release notes can be found [here](https://developers.pendo.io/category/mobile-sdk/). - For additional documentation, visit our [Help Center Mobile Section](https://support.pendo.io/hc/en-us/categories/4403654621851-Mobile).