안녕하세요?

저는 전화가 왔을 때 노티피케이션을 구현하려 하는데

사용자가 설정한 음악 혹은 진동모드의 값에 따라 전화기의 노티피케이션이 울리게하려 하는데 어떻게 해야 될지요??

 

public void SetMyNotification(){
 NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
  
  Notification notification = null;
  notification = new Notification(R.drawable.call, TickerMessage, System.currentTimeMillis());
  notification.vibrate = new long[]{1000, 1000, 200, 200};
  notification.defaults |= Notification.DEFAULT_VIBRATE;
  notification.flags = Notification.FLAG_AUTO_CANCEL;
  PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, NotificationShow.class), 0);
  notification.setLatestEventInfo(this, "Test Notify", "hello notification", contentIntent);
  nm.notify(R.string.app_name, notification); 
     }

 

고수님들의 좋은 답변 부탁드립니다.