App icon appearing undersized

I have used the code shown below, in order to try and set an app icon that is correctly sized. This follows the guidelines as written elsewhere on the UA site.

However, it doesn't have any effect. Do I need to be adding the NotificationFacctory code somewhere else? In a custom class perhaps?
The image I've used is a black and white picture, also as described in the UA guidelines.

Any advice would be greatly appreciated,



import android.util.Log;

import com.urbanairship.UAirship;
import com.urbanairship.push.notifications.DefaultNotificationFactory;

* Created by Mr. Stuart Saunders on 29/11/2016.

public class UAApplication extends Application {
public void onCreate() {

UAirship.takeOff(this, new UAirship.OnReadyCallback() {
public void onAirshipReady(UAirship airship) {
String channelId = UAirship.shared().getPushManager().getChannelId();
Log.v ("My Channel ID: " , channelId);

// Enable user notifications

// Create Notification Factory
DefaultNotificationFactory defaultNotificationFactory = new DefaultNotificationFactory(getApplicationContext());
// Get the Icon image from resources
// Set the accent color

Didn't find what you were looking for?

New post



  • I actually solved this problem 5 minutes after posting the question.

    The image needs to be white only, with a transparent background.
    The UA methods then work some mysterious magic to make it appear in a notification and the top icon bar.

    It still appears somewhat smaller than I'd like, however, but I'll continue tinkering and see what can be done.

  • Stu,

    If the icon is appearing smaller than what you would like, you may also set the Large Icon image by specifying:

    defaultNotificationFactory.setLargeIcon(<icon resource>);

Please sign in to leave a comment.