Pushwoosh
Main entry point for the Pushwoosh SDK.
Pushwoosh is a customer engagement platform that helps you turn user data into high-converting omnichannel campaigns. Build personalized customer journeys using advanced segmentation, behavior tracking, and automated messaging across push notifications, email, SMS, and WhatsApp.
Key Features:
- Push Notifications - Send rich push notifications with images, actions, and deep links
- User Segmentation - Tag users and create targeted campaigns based on behavior and preferences
- Cross-Device Tracking - Track users across multiple devices using User ID
- Local Notifications - Schedule notifications to be shown at specific times
- In-App Messages - Display rich in-app content to engaged users
- Analytics - Track push delivery, opens, and user engagement
- Multichannel Campaigns - Send messages via push, email, SMS, and WhatsApp
SDK Initialization:
The Pushwoosh SDK initializes automatically when your application starts - no manual initialization code is required. The SDK uses Android's ContentProvider mechanism to initialize itself before your Application class is created.
Important: You do NOT need to call any initialization methods in your Application class or Activities. Simply add the SDK dependency to your project and start using getInstance.
Quick Start:
// 1. Get Pushwoosh instance (SDK is already initialized automatically)
Pushwoosh pushwoosh = Pushwoosh.getInstance();
// 2. Register for push notifications
pushwoosh.registerForPushNotifications((result) -> {
if (result.isSuccess()) {
Log.d("App", "Push registered: " + result.getData().getToken());
} else {
Log.e("App", "Registration failed: " + result.getException());
}
});
// 3. Set user tags for targeting
TagsBundle tags = new TagsBundle.Builder()
.putString("Name", "John Doe")
.putInt("Age", 25)
.putString("Subscription", "premium")
.build();
pushwoosh.setTags(tags);
// 4. Set user ID for cross-device tracking
pushwoosh.setUserId("user_12345");
Important Notes:
- The SDK initializes automatically via ContentProvider - no manual initialization needed
- Always call getInstance to access the SDK instance
- On Android 13+, notification permission is requested automatically during registerForPushNotifications
- Set user tags to enable targeted campaigns and personalization
- Use setUserId to track users across multiple devices
- Handle push notifications using getLaunchNotification for deep linking
See also
Properties
Functions
// Retrieve and use user profile tags to personalize UI
private void loadUserProfile() {
Pushwoosh.getInstance().getTags((result) -> {
if (result.isSuccess()) {
TagsBundle tags = result.getData();
// Read user profile data
String userName = tags.getString("Name", "Guest");
int userAge = tags.getInt("Age", 0);
String subscriptionTier = tags.getString("Subscription_Tier", "free");
boolean isPremium = "premium".equals(subscriptionTier);
// Update UI based on tags
updateWelcomeMessage("Welcome back, " + userName + "!");
if (isPremium) {
showPremiumFeatures();
} else {
showUpgradePrompt();
}
// Check user preferences
List<String> interests = tags.getStringList("Interests");
if (interests != null && !interests.isEmpty()) {
showPersonalizedContent(interests);
}
Log.d("App", "User profile loaded: " + userName + ", tier: " + subscriptionTier);
} else {
Log.e("App", "Failed to retrieve tags: " + result.getException().getMessage());
// Show default UI
showDefaultContent();
}
});
}