0

Working on an application where I am receiving notifications in my device.

I have already set the graphic icon for the notifications in my code by using below code.setSmallIcon(drawableicon);

NotificationCompat.Builder notifBuilder = new NotificationCompat.Builder(this);
       notifBuilder.setSmallIcon(drawableicon);
       notifBuilder.setTicker(ticker);
       notifBuilder.setContentTitle(title);
       notifBuilder.setContentText(text);
      // notifBuilder.setLargeIcon(((BitmapDrawable)getResources().getDrawable(R.drawable.gift_candy_left)).getBitmap());
       notifBuilder.setContentIntent(contentIntent); 

       if(!isAppForground())  {
           Uri notificationSound =Uri.parse("android.resource://"+getPackageName()+"/"+R.raw.qubodup_popup);                
           notifBuilder.setSound(notificationSound);
       }


       NotificationManager notifManager = (NotificationManager)this.getSystemService(
               Context.NOTIFICATION_SERVICE);


       notifManager.notify(notifId, notifBuilder.build());

At the instant when device receives notification, in the Status Bar, the notification icon does not fits.

The icon fits well when I pull down the notification panel.

Please suggest me, how to work on the notification icon which I have show on Status Bar at the instant when notification receives on device.

Sam-In-TechValens
  • 2,501
  • 4
  • 34
  • 67
  • check for the size of icon. it should be 24dp as mentioned here: http://developer.android.com/design/style/iconography.html – Azhar Bandri Jul 23 '14 at 11:05
  • please see http://stackoverflow.com/questions/4265595/android-status-bar-expects-icons-of-size-25x25dp-while-guidelines-recommend-32x3 – androidStud Jul 23 '14 at 11:11

0 Answers0