You must use git to download the sdk from [repository](https://github.com/tecnaviapress/newsmemory-android-sdk)
1. The repository is private, to clone it you must generate an ssh key, see the [guide](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
2. Once the key is generate you must send to Tecnavia the public key and wait a confirmation that you are enabled
3. Inside root folder run the following command, replace TAG with the latest release, see the list on [releases](https://github.com/tecnaviapress/newsmemory-android-sdk/releases)
```sh
git clone --depth 1 --brach TAG git@github.com:tecnaviapress/newsmemory-android-sdk.git
```
4. if you already has the module you could update to another release by the following commands
```sh
cd newsmemory-android-sdk
git checkout tags/TAG
```
<aname="installation"></a>
## Installation
<aname="project"></a>
### Project Gradle
1. check main gradle repositories and dependencies
```java
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.2"
classpath "com.google.gms:google-services:4.3.4"
//add crashlytics only if the aar file is included
3. you could customize all dependencies version by updating the following variables, !pay attention, because the sdk may not starts or works properly add these variables to ext object in main gradle file, see below example.
1. The activity that load TaFragment must implement the following interface *DefaultHardwareBackBtnHandler*
```java
public class YourActivity extends AppCompatActivity implements DefaultHardwareBackBtnHandler {
...
@Override
public void invokeDefaultOnBackPressed() {
//TODO handle finish
}
}
```
2. you could extends activity class with TaActivity that already has an implementation of *DefaultHardwareBackBtnHandler* but also add some other methods to force locale.
```java
public class YourActivity extends TaActivity {
...
}
```
## Troubleshooting
1. if you have some build issues related to google play services versions you could add the following setting to build.gradle
```java
android {
...
googleServices {
disableVersionCheck = true
}
...
}
```
2. if you have the following error during the build `Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module`
add `--add-opens=java.base/java.io=ALL-UNNAMED` option to `org.gradle.jvmargs` entry in `gradle.properties`