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.