Android 当设备接收到来自服务器的通知时,状态栏上显示的图标?
处理应用程序时,我在设备中接收通知 我已经使用下面的code.setSmallIcon(drawableicon)为代码中的通知设置了图形图标强>Android 当设备接收到来自服务器的通知时,状态栏上显示的图标?,android,notifications,google-cloud-messaging,uistatusbar,Android,Notifications,Google Cloud Messaging,Uistatusbar,处理应用程序时,我在设备中接收通知 我已经使用下面的code.setSmallIcon(drawableicon)为代码中的通知设置了图形图标 NotificationCompat.Builder notifBuilder = new NotificationCompat.Builder(this); notifBuilder.setSmallIcon(drawableicon); notifBuilder.setTicker(ticker); noti
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());
当设备接收到通知时,状态栏中的通知图标不合适
当我拉下通知面板时,图标非常适合
请建议我,如何在设备收到通知时,在状态栏上显示通知图标 检查图标的大小。应为此处提到的24dp:请参见