Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Advanced push notifications

How to configure more advanced features of push notifications to your mobile device for an Optimizely Data Platform (ODP) campaign.

📘

Availability

Only customers onboarded prior to July 15, 2022 have access to the ODP Campaigns and have the ability to configure push notifications. For more information, contact your Customer Success Manager.

Push notifications can specify custom sounds and custom icons for your notifications to use when displaying to the user.

Custom notification sounds

Create a sound for your notification and save it in MP3 format. You should not make the sound too long. Then follow the instructions for your platform:

iOS

  1. Add the MP3 of the sound to the Xcode project at the root level.
  2. Modify the Custom Sound attribute in the iOS Settings of ODP Campaign using the full name of the sound (for example, bell.mp3).

Android

  1. Add the MP3 of the sound to the Android project at:

    <root>/android/app/src/main/res/raw/bell.mp3

  2. Under the Android Options, add a key/value pair with the key of soundName and the value of the filename (for example,bell.mp3).

Custom Icons

On Android, you can specify custom icons in a manner similar to specifying sounds. Place appropriately sized images into the correct folders under <project>/android/app/src/main/res.

DirectoryDimensions
mipmap-mdpi48x48
mipmap-hdpi72x72
mipmap-xhdpi96x96
mipmap-xxhdpi144x144
mipmap-xxxhdpi192x192

Then give the ODP campaign a new field named largeIcon with the name of the image (but without the extension, for example, icon instead of icon.png).