Skip to content

Commit

Permalink
Set on push config not inapp
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttwittrockcio committed Dec 2, 2024
1 parent fd4866b commit 3b46a48
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import io.customer.messaginginapp.MessagingInAppModuleConfig;
import io.customer.messaginginapp.ModuleMessagingInApp;
import io.customer.messagingpush.ModuleMessagingPushFCM;
import io.customer.messagingpush.MessagingPushModuleConfig;
import io.customer.sdk.CustomerIO;
import io.customer.sdk.CustomerIOBuilder;

Expand All @@ -35,12 +36,16 @@ public void initializeSdk(SampleApplication application) {

// Enable optional features of the SDK by adding desired modules.
// Enables push notification
builder.addCustomerIOModule(new ModuleMessagingPushFCM());
builder.addCustomerIOModule(new ModuleMessagingPushFCM(
new MessagingPushModuleConfig.Builder()
.setChannelName("Test Channel Name")
.build()
));

// Enables in-app messages
if (sdkConfig.isInAppMessagingEnabled()) {
builder.addCustomerIOModule(new ModuleMessagingInApp(
new MessagingInAppModuleConfig.Builder(sdkConfig.getSiteId(), sdkConfig.getRegion(), "Hello World")
new MessagingInAppModuleConfig.Builder(sdkConfig.getSiteId(), sdkConfig.getRegion())
.setEventListener(new InAppMessageEventListener(appGraph.getLogger()))
.build()
));
Expand Down

0 comments on commit 3b46a48

Please sign in to comment.