마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

notification 에서 텍스트를 두줄 이상 나오게 하려면 어떻게 해야 하나요?

0 추천
NotificationCompat.Builder notification = new NotificationCompat.Builder(context);
  notification.setContentTitle(intent.getStringExtra("type"));
  notification.setContentText(intent.getStringExtra("msg"));
  notification.setSmallIcon(R.drawable.ic_launcher);
  notification.setTicker(intent.getStringExtra("type"));
  notification.setAutoCancel(true);
  notification.setContentIntent(pendingIntent);
  //notification.setVibrate(vibra  new long[]{300, 500, 300, 500});
  notification.setVibrate(new long[] { 1000, 1000, 1000, 1000, 1000 });
  notification.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));

 

NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
  nm.notify(pushIndex, notification.getNotification());

 

현재 이렇게 푸쉬 왔을떄 NotificationManager 를 띄우고 있습니다.

여기서 내용이 한줄에서 짤려서 뒤 내용이 안나오는데 두줄이상 띄울수 있는 방법을 알고 싶습니다.

(얼마전까지 2.3버전등은 그렇게 안되는줄 알았는데 오늘 어떤 어플에서 푸쉬가 왓는데 2줄로 왔네요)

 

아니면 관련된 custom에 관한 조언 부탁드립니다.
남태우 (350 포인트) 님이 2013년 11월 20일 질문

1개의 답변

0 추천
aucd29 (218,390 포인트) 님이 2013년 11월 21일 답변
답변 감사드립니다 근데 안드로이드 4.1 이하 버전들 2.3 버전에서는 notification은 오류가 난다고 들어서 다른 방법이 혹시 있나 여쭤봅니다.
...