# Flutter SmartFace Plugin Installation Guide

This guide outlines the necessary steps to get the SmartFace Flutter plugin up and running on your Android device.

## Table of Contents

- [Flutter SmartFace Plugin Installation Guide](#flutter-smartface-plugin-installation-guide)
  - [Table of Contents](#table-of-contents)
  - [Download Native Libraries](#download-native-libraries)
  - [Unzip to `libs` Folder](#unzip-to-libs-folder)
  - [Modify `android/app/build.gradle`](#modify-androidappbuildgradle)
  - [Configure ProGuard Rules](#configure-proguard-rules)
  - [Get Credentials](#get-credentials)

## Download Native Libraries

1. Download the native libraries from [this Google Drive link](https://drive.google.com/file/d/1ChFdAtnGLKm7y0REVLdrQQCBd59rV45n/view?usp=drive_link).

## Unzip to `libs` Folder

2. After downloading the `libs.zip` file, unzip it.

    ```bash
    unzip path/to/downloaded/libs.zip -d path/to/flutter_project/android/
    ```

## Modify `android/app/build.gradle`

3. Open your `android/build.gradle` file and add the following lines inside it:

    ```
    project(':flutter_smartface') {
        ext.libsDir = rootProject.file('libs')
    }
    ```

    Make sure to sync your project after adding this line.

## Configure ProGuard Rules

4. If you're using ProGuard for your release builds, add the following rules to your `android/app/proguard-rules.pro` file:

    ```
    -keepclassmembers class br.com.visica.sface.** {
      *;
    }
    ```

    This ensures that the SmartFace SDK classes are not obfuscated during the build process.

## Get Credentials

5. To complete the setup, you'll need specific credentials for the SmartFace service. Please contact the support team to obtain these credentials.

---

Congratulations, you've successfully set up the SmartFace Flutter plugin for Android! If you encounter any issues, please refer to the troubleshooting section or contact support.