Basic customization

  1. Default push behaviour

    By default, the Ocamba receiver will show a notification on the device’s notification area when a content push is received. Tapping this notification will open the browser and track the open push conversion for you.

  2. Custom notification click actions

    • To change notification click actions add to Application class:
    • On Broadcast receiver on method ocambaNotificationClick create event:
    public void ocambaNotificationClick(String message, Context context) {
    • You can do same thing to notification action buttons:
    public void ocambaNotificationClick(String message, Context context) {
  3. Custom notification layout:

    • Change notification icon: To change notification icon (from status bar) create inside drawable (res -> drawable) xml icon with name:
    • Change notification color: To change notification elements color create inside colors (res -> values -> colors):
    <color name="ocamba_nc_name_color">#006291</color>
    <color name="ocamba_nc_text_color">#006291</color>
    <color name=“ocamba_nc_title_color”>#DB0000</color>
    • Change notification layout: To change notification layout add to Application class:

    And then on custom broadcast receiver on method ocambaNotificationReceived add:

    RemoteViews collapsedLayout = new RemoteViews(context.getPackageName(), R.layout.test_story_layout_small);
    RemoteViews expandedLayout = new RemoteViews(context.getPackageName(), R.layout.test_story_layout_large);
    collapsedLayout.setTextViewText(, message.getTitle()); collapsedLayout.setTextViewText(, message.getDescription()); expandedLayout.setTextViewText(, message.getTitle()); expandedLayout.setTextViewText(, message.getDescription()); expandedLayout.setImageViewBitmap(, getIcon(context, message.getImage()));
    OcambaHoood.notification().createCustomNotification(collapsedLayout, expandedLayout, message);
    • Change multimessage notification icons (indicator, arrows): To change multimessage notification indicator icon create inside drawable (res -> drawable) xml icon with name:

    To change multimessage notification arrows icon create inside drawable (res -> drawable) xml icon with name:


    NOTE: you can change notification sound, vibration pattern, notification layout (choose one type), title color, description color, multimessage indicator and arrows also from our Ocamba platform.

    NOTE: from android 12 notifications with custom content views will no longer use the full notification area. Instead, system applies a standard template. Previously, custom notifications were able to use the entire notification area and provide their own layouts and styles.