Sign in to your account.
Click on Deploy over on the left sidebar and then click on Brand keys.
In your project build.gradle
file (Project:...), merge the following line with your existing repositories configurations:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
In your app module build.gradle
file (Module:app), add the following dependency:
implementation 'com.github.%{polaria-begin}polaria%{polaria-end}:android-sdk:1.0'
In your MainActivity class, add:
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Xeno.initialize(this, "xpk-..."); // Replace with your own brand public and private keys
// Your code here ...
}
}
You'll also need to add internet permissions to your AndroidManifest.xml
To show the chatbox to your users, call the Xeno.show()
function.
// Example code:
myButton.setOnClickListener { view ->
Xeno.show()
}
Click on the button where the show()
method is called and your Xeno chatbox should appear.
Type something (such as: "Hey! Do you read me?").
%{polaria-begin} Open up your Polaria account. Your message should appear in a dedicated conversation in your Polaria. %{polaria-end}
If you can see your message appearing within a conversation channel, this means that your Xeno integration was a success. Congrats! Otherwise, if you believe you've followed this process correctly and that Xeno isn't working on your mobile app as it should, please contact us so that we may help you resolve the issue.
What's next? You can Automatically identify your users on your Android apps or check our Android SDK API