# Requirements for the Android SDK

This guide outlines the system requirements and development environment setup needed to use the Agentforce Mobile SDK for Android.

## Development Environment

To develop using the Agentforce SDK, you'll need:

- **Android Studio**: Android Studio Meerkat 2024.3.1 or newer
- **Android Gradle Plugin**: Version 8.9.1
- **Kotlin**: Version 1.9.22 or higher
- **Minimum SDK Version**: API level 29 (Android 10) or higher
- **Jetpack Compose**: The SDK's UI components are built with Compose. Your project must be configured to use it.

## Required Permissions

Several features of the SDK require user permissions.

- Camera access for image attachments
- Microphone access for voice input
- Storage access for file sharing

Update your `AndroidManifest.xml` with the following perms and providers.

```sfdocs-code {"lang":"kotlin", "title": "Required Permissions"}
<uses-feature
   android:name="android.hardware.camera"
   android:required="false" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
```

```sfdocs-code {"lang":"kotlin", "title": "Required File Providers"}
<provider
   android:name="androidx.core.content.FileProvider"
   android:authorities="${applicationId}.fileprovider"
   android:exported="false"
   android:grantUriPermissions="true"
   tools:replace="android:authorities">
   <meta-data
       android:name="android.support.FILE_PROVIDER_PATHS"
       android:resource="@xml/file_paths"
       tools:replace="android:resource" />
</provider>

<provider
android:name="com.salesforce.android.agentforcesdkimpl.utils.AgentforcePDFFileProvider"
   android:authorities="${applicationId}.pdffileprovider"
   android:exported="false"
   android:grantUriPermissions="true">
   <meta-data
       android:name="android.support.FILE_PROVIDER_PATHS"
       android:resource="@xml/pdf_file_paths" />
</provider>
```

Also, add file paths to `res/xml`.

`@xml/file_paths`

```sfdocs-code {"lang":"kotlin", "title": "file_paths.xml"}
<?xml version="1.0" encoding="utf-8"?>
<paths>
   <cache-path name="cache" path="." />
</paths>
```

`@xml/pdf_file_paths`

```sfdocs-code {"lang":"kotlin", "title": "pdf_file_paths.xml"}
<?xml version="1.0" encoding="utf-8"?>
<paths>
   <cache-path
       name="cache"
       path="." />
   <external-cache-path
       name="external_cache"
       path="." />
   <files-path
       name="files"
       path="." />
</paths>
```

## Project Configuration

### Gradle Configuration

```kotlin
android {
    compileSdk 35

    defaultConfig {
        minSdk 29
        targetSdk 34
    }

    compileOptions {
 isCoreLibraryDesugaringEnabled = true
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }


    kotlinOptions {
        jvmTarget = "17"
    }

    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.8"
    }
}
```

## Next Steps

- **Installation**: See [Install the SDK](/docs/ai/agentforce-mobile-sdk/guide/agentforce-mobile-sdk-android-install.md) for dependency setup
- **Integration**: See [Integration Guide](/docs/ai/agentforce-mobile-sdk/guide/agentforce-mobile-sdk-android-integration.md) for implementation
