Whenever a new user opens your app after you have integrated Contlo SDK, we will create an anonymous profile on Contlo with a Mobile Push Subscription that will be in a pending state.

A user profile is automatically created for every user who launches your mobile application, whether the user is logged in or not.

Whenever a new user opens your app after you have integrated Contlo SDK, we will create an anonymous profile on Contlo with a Mobile Push Subscription that will be in a pending state.

You can refer to the Push Configuration page to understand Push Permission and sending consent to Contlo.

Anonymous Users

Unidentified users are anonymous users whose profiles don't contain an email or mobile number. These profiles are created using their unique FCM token.

Additionally, to uniquely identify Anonymous users across installs you can track Advertising ID

Identified Users

Identified users are those whose email or phone number is known.

Save user profile

You can call the following functions from your app after integrating Contlo SDK to set profile details for identified users

import com.contlo.androidsdk.UserProfile.ContloAudience
.
.
.
.
val contloAudience = ContloAudience(applicationContext)

//Profile Properties
contloAudience.setUserFirstName(firstName)
contloAudience.setUserLastName(lastName)
contloAudience.setUserEmail(emailAddress)
contloAudience.setUserPhone(phoneNumber)
contloAudience.setUserCity(city)
contloAudience.setUserCountry(country)
contloAudience.setUserZip(zipcode)

//Custom Properties
contloAudience.setUserAttribute("Password", password)
contloAudience.setUserAttribute("Referal Code", referalCode)

//This function call sends the data to Contlo
//Make sure to call this function anywhere you set user properties
contloAudience.sendUserDatatoContlo()

Already Logged In Users

When you integrate Contlo SDK and update your app, your existing users should get a Identified User Profile created on Contlo when the start the app after update. To handle this, you need to check after calling the init function that if the user is already logged in then you need to call above function immediately after init to make a Identified User Profile

Your starting code of onCreate() method of your launcher activity or Application Class should look like this

import com.contlo.androidsdk.ContloSDK
import com.contlo.androidsdk.UserProfile.ContloAudience


override fun onCreate(savedInstanceState: Bundle?) {
  super.onCreate(savedInstanceState)
  setContentView(R.layout.activity_main)

  val contloSDK = ContloSDK()
  contloAudience = ContloAudience(applicationContext)

  contloSDK.init(applicationContext)

  if(USER_ALREADY_LOGGED_IN){

    //Set Profile Properties and Custom Properties if any, then ->
    contloAudience.sendUserDatatoContlo()

  }
}