Client SDK
Android SDK
The Raven Android SDK allows you to -
- Manage (Create/Update) your users and their preferences on Raven.
- Manage Push tokens on Raven.
Setup
This setup helps you to set user and manage tokens on Raven. It assumes you already have setup Firebase and are handling the rendering of notifications yourself. Also, you must setup a Firebase Integration on the console and create an event with a Push template as defined here. Once done, please follow the below steps
-
Setup Firebase
-
Add the following in your project gradle:
- Add the following library in your app gradle. Please check the latest version here.
- Initialize the SDK in Application onCreate.
- Set user on signup/login. You can use any of the following methods to set user. Note that this will create a user if it does not exists in Raven. If it exists, it will simply update the user if there is any change.
- Set the Firebase device token on Raven.
- When you receive a message from Firebase in the
onMessageReceived
callback, please update Raven with DELIVERED status. If you have set up Notification click and dismiss receivers, please update Raven with CLICKED and DISMISSED statuses respectively. This method takes the RavennotificationId
as an argument. Raven generates a unique notification id and attaches it in the data payload.
- When the user logs out of your app, we need to de-register the device token.
Call
logout
to logout the user from Raven.