Minimum Requirements
- Android API Level 19
- Android X Compatibility
- Compile and Target SDK version 31
- Build Tool Version 30.0.3
Add Android SDK
- Add the following repository to your project’s
build.gradle
file underallprojects
.
123456allprojects {repositories {...maven { url 'https://jitpack.io' }}} - Add the following dependency to the module’s
build.gradle
file underdependencies
.
123dependencies {implementation 'com.github.adxcorp:talkplus-android:0.2.8'} - Add the
hive-talkplus-x.x.x.aar
file to the module’s libs specified folder.
Initialize
Initialize Hive TalkPlus API before using Hive TalkPlus after calling AuthV4.setup()
of Hive SDK.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
class SampleApplication { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) HiveTalkPlus.init { isInit, message -> if (isInit) { // SUCCESS } else { // FAILURE } } } } |
Login / Logout Process
- You need to login (
LoginWithToken
) once Hive TalkPlus API has been initialized. - You can get the token required when calling
LoginWithToken
through theAuthV4.getHiveTalkPlusLoginToken()
function after callingAuthV4.signIn()
. - When a user logs out, make sure to call the
Logout
function of Hive TalkPlus. If theLogout
function call is omitted, the user will continue to receive notifications even when offline.