You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Place google-services.json into android/app/ folder
AI-Assisted Integration
Integrate the Pushwoosh Flutter plugin using AI coding assistants (Claude Code, Cursor, GitHub Copilot, etc.).
Requirement: Your AI assistant must have access to Context7 MCP server or web search capabilities.
Quick Start Prompts
Choose the prompt that matches your task:
1. Basic Plugin Integration
Integrate Pushwoosh Flutter plugin into my Flutter project.
Requirements:
- Install pushwoosh_flutter via pub
- Initialize Pushwoosh with my App ID in main()
- Register for push notifications and handle onPushReceived and onPushAccepted streams
Use Context7 MCP to fetch Pushwoosh Flutter plugin documentation.
2. Tags and User Segmentation
Show me how to use Pushwoosh tags in a Flutter app for user segmentation.
I need to set tags, get tags, and set user ID for cross-device tracking.
Use Context7 MCP to fetch Pushwoosh Flutter plugin documentation for setTags and getTags.
3. Message Inbox Integration
Integrate Pushwoosh Message Inbox into my Flutter app. Show me how to:
- Display the inbox UI with custom styling using PWInboxStyle
- Load messages programmatically
- Track unread message count
Use Context7 MCP to fetch Pushwoosh Flutter plugin documentation for presentInboxUI.
import'package:pushwoosh_flutter/pushwoosh_flutter.dart';
// Register emailawaitPushwoosh.getInstance.setEmail("user@example.com");
// Register multiple emailsawaitPushwoosh.getInstance.setEmails(["user@example.com", "work@example.com"]);
// Set user ID and emails togetherawaitPushwoosh.getInstance.setUserEmails("user_123", ["user@example.com"]);
// Register SMS and WhatsAppPushwoosh.getInstance.registerSmsNumber("+1234567890");
Pushwoosh.getInstance.registerWhatsappNumber("+1234567890");
7. Live Activities (iOS)
import'package:pushwoosh_flutter/pushwoosh_flutter.dart';
// Default setup (call once at app start)awaitPushwoosh.getInstance.defaultSetup();
// Start a Live ActivityawaitPushwoosh.getInstance.defaultStart(
"delivery_123",
{"driverName":"John"}, // attributes
{"status":"On the way"} // content
);
// Or start with a custom tokenawaitPushwoosh.getInstance.startLiveActivityWithToken(token, "delivery_123");
// Stop Live ActivityawaitPushwoosh.getInstance.stopLiveActivity();
8. Deep Link Handling
import'package:pushwoosh_flutter/pushwoosh_flutter.dart';
Pushwoosh.getInstance.onDeepLinkOpened.listen((String deepLink) {
print("Deep link opened: $deepLink");
// Navigate to the appropriate screen
});
9. JavaScript Interface for In-App Messages
import'package:pushwoosh_flutter/pushwoosh_flutter.dart';
// Register JavaScript interface for In-App communicationawaitPushwoosh.getInstance.addJavascriptInterface('flutter', {
'onButtonTap': (Map<String, dynamic> args) {
print("Button tapped with args: $args");
return"OK";
},
'getUserData': (Map<String, dynamic> args) {
return {"name":"John", "premium":true};
}
});
// Remove interface when no longer neededawaitPushwoosh.getInstance.removeJavascriptInterface('flutter');
API Reference
Initialization & Registration
Method
Description
Pushwoosh.initialize(params)
Initialize the plugin. Call on every app launch
registerForPushNotifications()
Register for push notifications, returns push token
unregisterForPushNotifications()
Unregister from push notifications
getPushToken
Get the push token (Future)
getHWID
Get Pushwoosh Hardware ID (Future)
Tags & User Data
Method
Description
setTags(tags)
Set device tags
getTags()
Get device tags
setUserId(userId)
Set user identifier for cross-device tracking
setLanguage(language)
Set custom language for localized pushes
setEmail(email)
Register email for the user
setEmails(emails)
Register multiple emails
setUserEmails(userId, emails)
Set user ID and register emails
registerSmsNumber(number)
Register SMS number (E.164 format)
registerWhatsappNumber(number)
Register WhatsApp number (E.164 format)
Push Events (Streams)
Stream
Description
onPushReceived
Stream of PushEvent when notification is received
onPushAccepted
Stream of PushEvent when notification is opened
onDeepLinkOpened
Stream of String when a deep link is opened
In-App Messages & Events
Method
Description
postEvent(event, attributes)
Post event to trigger In-App Messages
addJavascriptInterface(name, methods)
Register JS interface for Rich Media communication
removeJavascriptInterface(name)
Remove a JavaScript interface
Badge Management
Method
Description
setApplicationIconBadgeNumber(badge)
Set badge number
getApplicationIconBadgeNumber
Get current badge number (Future)
addToApplicationIconBadgeNumber(badge)
Increment/decrement badge
Live Activities (iOS)
Method
Description
defaultSetup()
Setup default Live Activity handling
defaultStart(activityId, attributes, content)
Start a default Live Activity
startLiveActivityWithToken(token, activityId)
Start Live Activity with a token
stopLiveActivity()
Stop the current Live Activity
Communication Control
Method
Description
startServerCommunication()
Resume communication with Pushwoosh server
stopServerCommunication()
Pause communication with Pushwoosh server
setShowForegroundAlert(value)
Show/hide alerts when push received in foreground
Android-specific
Method
Description
setMultiNotificationMode(on)
Allow multiple notifications in notification center