0
私は検索して解決策を見つけましたが、そのソリューションは複数行のプッシュ通知を表示していません。 私のコードは、私がプッシュ通知で複数行のテキストを表示することができますどのように、以下の1行にテキストを表示するAndroidプッシュ通知
int id = (int) System.currentTimeMillis();
Intent intent = new Intent(this, Activity.class);
Bundle bundle = new Bundle();
bundle.putString("id", u_id);
intent.putExtras(bundle);
PendingIntent resultPendingIntent =
PendingIntent.getActivity(
this,
0,
intent,
PendingIntent.FLAG_CANCEL_CURRENT
);
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(
this);
Notification notification = mBuilder.setSmallIcon(getNotificationIcon()).setTicker(getResources().getString(R.string.app_name)).setWhen(0)
.setAutoCancel(true)
.setContentTitle(getResources().getString(R.string.app_name))
.setStyle(new NotificationCompat.BigTextStyle().bigText(messageBody))
.setContentIntent(resultPendingIntent)
.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))
.setLargeIcon(BitmapFactory.decodeResource(getResources(), getNotificationIcon()))
.setContentText(messageBody).build();
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(id, notification);
のですか?
これを参照してください。http://stackoverflow.com/questions/22079663/how-to-apply-a-big-view-style-to-a-notification-using-parse-library –