> For the complete documentation index, see [llms.txt](https://bayun.gitbook.io/bayun-awss3-wrapper-android-programming-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bayun.gitbook.io/bayun-awss3-wrapper-android-programming-guide/1_set_project.md).

# 3. Integrate Bayun SDK

### 3.1 Bayun SDK integration in the Project

* Create a folder named `Bayun` in your project and add the `Bayun.aar` file.

```xml
dependencies {
    implementation files('<Path-of-aar-file>')  //implementation files('../Bayun/Bayun.aar')
}
```

* The Bayun SDK requires some dependencies that couldn't be included in the archive itself. For the SDK to work, these dependencies must be added by the app implementing the Bayun SDK. In the "build.gradle" file of the "app" module of your application, add the following code.

```groovy
dependencies {
....

    //Supported Conginito SDK version
    api 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.56.0'
    //Supported AWS SDK version
    api 'com.amazonaws:aws-android-sdk-s3:2.56.0'
    // For Bayun SDK
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.10.1'
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.1'
    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.10.1'
    implementation 'com.github.tony19:logback-android:2.0.0'
    implementation 'androidx.biometric:biometric:1.0.1'
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.okhttp3:okhttp:4.9.3'
    implementation 'org.slf4j:slf4j-api:1.7.30'
    implementation 'com.yakivmospan:scytale:1.0.1'
}
```

* If your application uses Java and not Kotlin, you might need to also add another dependency that will form a bridge between the Kotlin dependencies of the SDK and your Java code.

```groovy
dependencies {
    ....
    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.61"
}
```

* If your application uses Java and  Kotlin, you might need to also add `:Bayun` in `setting.gradle` file

```xml
include ':app', ':Bayun'
```

### 3.2 AndroidManifest.xml

* The Bayun Android SDK requires some permissions and references from your app’s AndroidManifest.xml file. These permissions allow the SDK to monitor network state.

```groovy
<!-- Standard permissions -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
```

* The Bayun Android SDK contains a service and an activity that must be declared in your app's AndroidManifest.xml file, for it to work.

```groovy
<!-- Declare Bayun SDK's background service -->
service android:name="com.bayun_module.BayunBackgroundService"/>
<!-- Declare Bayun SDK's background activity for screen locks -->
<activity android:name="com.bayun_module.EmptyActivity"/>

```

### 3.3 Adding Bayun AWSS3 wrapper classes

you can find the `S3Wrapper` folder from [Github](https://github.com/bayunsystems/BayunSDK/tree/master/Android/S3Wrapper)

Drag and drop the `S3Wrapper` folder into your project.

![](https://1266044526-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6FcfS2zzgYONZ6if3V%2Fsync%2F72f9bb503c81a583d0724c47654d5a29c5872bd5.PNG?generation=1588343323731285\&alt=media)

Your project is now ready to use the Bayun AWSS3 Wrapper.
