Android SDK Setup
Last updated
Last updated
to FlareLane and create a project
Follow this guide below:
Add the Gradle repository. Enter the following values inside the repositories block:
Open your App level build.gradle(<project>/<app>/build.gradle), add the SDK and click Sync Now to get up to date.
Enter android.name=".MainApplication"
in the AndroidManifest.xml file and generate the MainApplication class file through the editor helper. You can also create this file manually.
Add the following code to onCreate
. You can check your project ID at FlareLane console's Project.
After completing all the steps, build and run your app. Devices that subscribe to push notifications will be automatically added to FlareLane console's All Devices.
Before actual deployment, be sure to verify that the push notifications are being received properly on the device and that the statistics are accurately recorded when the push notifications are clicked.
FlareLane's device is 'anonymous' and you can match the device with your user based on the unique user ID that identifies your user.
Usually, when a user sign-up or log-in, you should execute setUserId
.
To set a accent color or channel name, add the following lines:
To customize notification icons, see below:
Setting up has many benefits. You can distinguish whether a user has signed-up, and push notifications can be sent based on the User ID.
To use Journeys or , integrate custom data via SDK or API: