Table of Contents |
---|
...
notificationSmallIcon: Int
notificationSmallIconDarkMode: Int
isNotificationLargeIcon: Boolean
notificationLargeIcon: Int
notificationLargeIconDarkMode
notificationPushIntent: String
notificationChannelName: String
notificationColor: String
Optional Parameters | Description |
---|---|
| For entering the icon that is going to be shown in the status bar and the left top corner of the notification area. You should enter the ID of a resource in your project. Default Value : Application icon |
| For entering the Default Value : Application icon |
| For determining if there is going to be a large icon in the right of the notification area. Default Value : false (no large icon) |
| For entering the large icon that is going to be shown in the right of the notification area. You should enter the ID of a resource in your project. Default Value : Application icon (if |
| For entering the Default Value : Application icon (if |
| For entering the activity that is going to be triggered when the notification is clicked. You should enter the full path of the activity. Default Value : launcher activity |
| For entering the name of the notification channel. Default Value : Application name |
| For entering the accent color value that is going to be used in the notification area. |
| For setting the priority of the notification.(For heads-up notifications, the priority must be set to HIGH) |
An example use that includes all parameters is below:
...
Code Block | ||
---|---|---|
| ||
RelatedDigital.setIsPushNotificationEnabled(
context,
true,
"googleAppAliasValue",
"huaweiAppAliasValue",
token,
R.drawable.text_icon,
R.drawable.text_icon_dark_mode,
true,
R.mipmap.ic_launcher,
R.mipmap.ic_launcher,
"com.relateddigital.androidexampleapp.PushNotificationActivity",
"relateddigital-android-test",
"#d1dbbd"
); |
Getting Push Notification Permission(Android 13 or higher)
Validate your SDK versions. Compile and target SDK version should be at least 33.
Code Block | ||
---|---|---|
| ||
android {
compileSdkVersion "33"
defaultConfig {
targetSdkVersion "33"
}
} |
Use the below RelatedDigital method to trigger the native prompt to request push notification permission.
Kotlin
|
Java
|
Token-User Match
The information about the user can be sent in signUp/Login stage or after to our servers. If there is a user in the server whose information is the same, the related token will be matched to this user.
After sending the mandatory and optional parameters, you should call sync() method.
Kotlin
|
Java
Code Block | ||
---|---|---|
| ||
--Mandatory parameters-- RelatedDigital.setEmail(context, "test@euromsg.com"); RelatedDigital.setRelatedDigitalUserId(context, "testRelatedDigitalUserId"); --Optional parameters-- RelatedDigital.setEmailPermit(context, EmailPermit.ACTIVE); RelatedDigital.setGsmPermit(context, GsmPermit.ACTIVE); RelatedDigital.setTwitterId(context, "testTwitterId"); RelatedDigital.setFacebookId(context, "testFacebookId"); RelatedDigital.setPhoneNumber(context, "testPhoneNumber"); RelatedDigital.setUserProperty(context, "instagram", "testInstagramId"); RelatedDigital.sync(context); |
When Push Notification Module is enabled via RelatedDigital.setIsPushNotification()
, the token information is written to RMC servers. This token is saved as "anonymous". In order to match this token with a user, an identifier information for the user (KEY_ID or EMAIL) should be sent to RMC.
In order the data that you sent to be loaded to RMC panel correctly, you should use the same reference value (KEY_ID* veya E-Mail) that you use in your RMC account when sending data via mobile channel.
*KEY_ID: It is the ID that you use to make a user unique in your system like CRM id, userId, customerId, accountId.
|
IYS E-Mail Registration (For Turkey)
...
Info |
---|
If you do not see a user match in RMC, please get in contact with RMC support team and ask to activate the FLAG of the related appKey. |
Push Notification Click Report and Directing
...
Info |
---|
You can use the campaign ID as utm_campaign since it has to be different each time. For this, you can use <##CAMP_ID##> variable. |
Push Message History
You can have the anonymous push messages sent in the last 30 days as shown below.
...
Code Block | ||
---|---|---|
| ||
PushMessageInterface pushMessageInterface = new PushMessageInterface() { @Override public void success(List<Message> pushMessages) { // Make your implementation by using pushMessages here: } @Override public void fail(String errorMessage) { Log.e("Past Notifications", errorMessage) } }; RelatedDigital.getPushMessagesWithID(activity, pushMessageInterface); |
Push Message Content
Veri Tipi | Değişken | Açıklama |
---|---|---|
String | mediaUrl | Photo, video url |
String | altUrl | Alternate URL |
String | campaignId | Campaign ID |
String | pushId | Notification ID |
String | url | Campaign URL |
String | message | Notification Message |
String | title | Notification Title |
String | sound | Notification Sound |
PushType | pushType | Notification Type |
Map<String, String> | params | Custom Parameters |
Application Badge Count
The number of the notifications that come from Related Digital is shown on the application icon if the user chooses showing it as number. In order to clear this number when the application is opened, you should call clearBadgeCount() method as below:
...