# 1. Install FOCR SDK

## Setuip gradle maven

{% tabs %}
{% tab title="Gradle v1.x-5.x" %}

```gradle
allprojects {
    repositories {
        google()  
        mavenCentral()
        maven { url 'https://jitpack.io' } <- add this line
    }
}
```

{% endtab %}

{% tab title="Gradle v6.x+" %}

```gradle
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' } <- add this line
    }
}
```

{% endtab %}
{% endtabs %}

## Open file app/build.grade then add sdk:

```gradle
dependencies {
...
  implementation 'com.github.FTechMobile:focr-android:1.0.2'
}
```

## Initialize FOCR in file `Application`

{% tabs %}
{% tab title="Java" %}

```java
@Override
public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {
    super.onCreate(savedInstanceState, persistentState);
    ...
    OCRManager.init(getApplicationContext());
}
```

{% endtab %}

{% tab title="Kotlin" %}

```java
override fun onCreate() {
  super.onCreate()
  ...
  OCRManager.init(applicationContext)
}
```

{% endtab %}
{% endtabs %}
