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.gradlefile underallprojects.
123456allprojects {repositories {...maven { url 'https://jitpack.io' }}} - Add the following dependency to the module’s
build.gradlefile underdependencies.
123dependencies {implementation 'com.github.adxcorp:talkplus-android:0.2.8'} - Add the
hive-talkplus-x.x.x.aarfile 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
LoginWithTokenthrough theAuthV4.getHiveTalkPlusLoginToken()function after callingAuthV4.signIn(). - When a user logs out, make sure to call the
Logoutfunction of Hive TalkPlus. If theLogoutfunction call is omitted, the user will continue to receive notifications even when offline.
