Android Integration

Requirements

In app build.gradle file:

  defaultConfig {
        minSdkVersion 21 
        targetSdkVersion 28 or above  
  }

In gradle.properties file add below lines:

android.useAndroidX:true
android.enableJetifier:true

JitPack

In app build.gradle file:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Add the dependency in your app build.gradle file:

dependencies {
        implementation 'com.github.iicontact:iicontact-android-embedded:Tag'
}

Usage

In your Activity:

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.new_connect_activity_login);

        IIContactSDK.getInstance().initSDK(this);
   }

In your xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:background="@android:color/holo_red_light"
    android:layout_height="match_parent">

<net.iicontact.mobileapp.IIContactView
       android:id="@+id/iiContactView"  
       android:visibility="visible"  
       android:animateLayoutChanges="true"  
       android:layout_width="wrap_content"  
       android:layout_height="wrap_content"  
       android:layout_margin="20dp"  
       android:layout_centerHorizontal="true"  
       android:layout_alignParentBottom="true"  
       android:layout_marginBottom="20dp">  
    </net.iicontact.mobileapp.IIContactView>
</RelativeLayout>

Put the below line in your code where the firebase token can be received:

IIContactSDK.getInstance().setDeviceToken(<Firebase device token>);

To read notifications for the LiiveTouch app:

  @Override  
    public void onMessageReceived(RemoteMessage remoteMessage) {  
        super.onMessageReceived(remoteMessage);  
        IIContactSDK.getInstance().handleNotification(<Context, RemoteMessage>);
 }
Logo LiiveTouch blanc grande taille

Terms of use – Privacy policyQnA – Contact

 

©2019 – Copyright LiiveTouch- All rights reserved

color
https://www.liivetouch.com/wp-content/themes/swape/
https://www.liivetouch.com/
#0b9df0
style1
paged
Loading posts...
/home/liivetouze/www/
#
on
none
loading
#
Sort Gallery
on
yes
yes
off
on
off
en