SDK Methods
Manually Triggering the Permission Dialog
PushSDK.PushNotifications.showPermissionPrompt(completion = { granted, response, error ->
// Optional callback
println("User accepted permissions: $granted")
}PushSDK.PushNotifications.showPermissionPrompt((granted, response, error) -> {
// Optional callback
System.out.printf("User accepted permissions: %b", granted);
return null;
});Adding Attributes to a Subscriber's Profile
PushSDK.UserProfile.set(key="interests", value=listOf("politics", "news"))PushSDK.UserProfile.set("interests", List.of("politics", "news"));PushSDK.UserProfile.set(data=hashMapOf(
"is_paying_subscriber" to true,
"interests" to listOf("politics", "news")
))PushSDK.UserProfile.set(Map.of(
"is_paying_subscriber", true,
"interests", List.of("politics", "news")
));// add 'sports' to the subscriber's existing interests
PushSDK.UserProfile.append(key = "interests", values = listOf("sports"))
// remove 'fashion' and 'news' from the subscriber's interests
PushSDK.UserProfile.remove(key = "interests", values = listOf("fashion", "news"))// add 'sports' to the subscriber's existing interests
PushSDK.UserProfile.append("interests", List.of("sports"));
// remove 'fashion' and 'news' from the subscriber's interests
PushSDK.UserProfile.remove("interests", List.of("fashion", "news"));Activity Tracking (URL / Screen Visits)
Retrieving Your Anonymous Push ID
Setting the Subscriber's External ID
Determining if a Visitor is Already Subscribed
Determining if a Visitor is Eligible to Prompt
Pausing / Resuming a User's Notifications (Soft Unsubscribe)
Permanently Delete a User
Setting the SDK Log Level
Last updated