-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/release/3.5.1'
- Loading branch information
Showing
15 changed files
with
132 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,8 @@ | |
![Applivery Logo](https://www.applivery.com/wp-content/uploads/2019/06/applivery-og.png) | ||
|
||
![Android CI](https://github.com/applivery/applivery-android-sdk/workflows/Android%20CI/badge.svg) | ||
[![Download](https://api.bintray.com/packages/applivery/maven/applivery-android-sdk/images/download.svg)](https://bintray.com/applivery/maven/applivery-android-sdk/_latestVersion) | ||
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.applivery/applivery-sdk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.applivery/applivery-sdk/) | ||
[![](https://jitpack.io/v/Applivery/applivery-android-sdk.svg)](https://jitpack.io/#Applivery/applivery-android-sdk) | ||
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/Applivery) | ||
|
||
### Quality checks | ||
|
@@ -49,13 +50,6 @@ You can get your APP TOKEN in your App -> Settings -> Integrations section. | |
|
||
## SDK Installation | ||
|
||
<!-- | ||
### Gradle with jCenter dependency | ||
[ ![Download](https://api.bintray.com/packages/applivery/maven/applivery-android-sdk/images/download.svg) ](https://bintray.com/applivery/maven/applivery-android-sdk/_latestVersion) | ||
```groovy | ||
implementation 'com.applivery:applivery-sdk:3.4' | ||
```--> | ||
|
||
### Gradle with JitPack Maven dependency | ||
[![](https://jitpack.io/v/Applivery/applivery-android-sdk.svg)](https://jitpack.io/#Applivery/applivery-android-sdk) | ||
|
||
|
@@ -72,19 +66,17 @@ Add the following repository to your's root gradle: | |
Add the following dependency to your app gradle: | ||
```groovy | ||
dependencies { | ||
implementation 'com.github.Applivery:applivery-android-sdk:v3.4' | ||
} | ||
implementation 'com.github.Applivery:applivery-android-sdk:${latestVersion}' | ||
``` | ||
|
||
### Gradle with Nexus/MavenCentral dependency | ||
|
||
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.applivery/applivery-sdk/badge.svg)](https://search.maven.org/#search%7Cga%7C1%7Capplivery) | ||
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.applivery/applivery-sdk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.applivery/applivery-sdk/) | ||
|
||
add the following dependency to your app gradle: | ||
|
||
```groovy | ||
compile 'com.applivery:applivery-android-sdk:3.4' | ||
implementation 'com.applivery:applivery-android-sdk:${latestVersion}' | ||
``` | ||
|
||
## SDK Setup | ||
|
26 changes: 26 additions & 0 deletions
26
applivery-base/src/main/java/com/applivery/base/domain/PreferencesManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.applivery.base.domain | ||
|
||
import android.content.SharedPreferences | ||
import androidx.core.content.edit | ||
import com.applivery.base.di.InjectorUtils | ||
|
||
class PreferencesManager(private val preferences: SharedPreferences) { | ||
|
||
var anonymousEmail: String? | ||
get() = preferences.getString(KeyEmail, null) | ||
set(value) = preferences.edit { putString(KeyEmail, value) } | ||
|
||
companion object { | ||
private const val KeyEmail = "preferences:anonymous_email" | ||
|
||
@Volatile | ||
private var instance: PreferencesManager? = null | ||
|
||
fun getInstance() = | ||
instance ?: synchronized(this) { | ||
instance ?: PreferencesManager(InjectorUtils.provideSharedPreferences()).also { | ||
instance = it | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.