For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.

Scenario 3: Existing applications using broadcast/Unicast notification in their application


  1. Initialize the MFPPush client instance in your application:

    MFPPush push = MFPPush.getInstance(); push.initialize(_this);

  2. Implement the interface MFPPushNotificationListener and define onReceive().

    @Override public void onReceive(MFPSimplePushNotification message) { Log.i("Push Notifications", message.getAlert()); }

  3. Register the mobile device with push notification service.

    push.registerDevice(new MFPPushResponseListener<String>(){ @Override public void onFailure(MFPPushException arg0) { Log.i("Push Notifications", "Failed to register"); } @Override public void onSuccess(String arg0) { Log.i("Push Notifications", "Registered successfully"); } });

  4. (Optional) Un-register the mobile device from push notification service.

    push.unregisterDevice(new MFPPushResponseListener<String>(){ @Override public void onFailure(MFPPushException arg0) { Log.i("Push Notifications", "Failed to unregister"); } @Override public void onSuccess(String arg0) { Log.i( "Push Notifications", "Unregistered successfully"); } });

  5. Remove WLClient.Push.isPushSupported() (if used) and use push.isPushSupported();.
  6. Remove the following WLClient.Push APIs:

    • registerEventSourceCallback()
    • WLOnReadyToSubscribeListener and WLNotificationListener Implementation


Remove WL.Server.sendMessage() (if used) in your adapter.

Complete the following steps for every application that was using the same event source:

  1. Set up the credentials by using the MobileFirst Operations Console. See Configuring push notification settings.

    We can also set up the credentials by using Update GCM settings (PUT) REST API, for Android applications or Update APNs settings (PUT) REST API, for iOS applications.

  2. Add the scope push.mobileclient in Scope Elements Mapping.
  3. Create tags to enable push notifications to be sent to subscribers. See Creating tags for push notification.
  4. We can use either of the following methods to send notifications:

Parent topic: Native Android applications