2014-05-20 4 views
0

사용자가 특정 날짜와 시간에 여러 개의 알람을 넣고 시간이되면 각 알람에 대해 알림을받습니다. 각 알림마다 다른 ID 번호가 있습니다. 내 문제는 내가 2 개의 경보를 넣으면 더 새로운 것이 작동하지만 이전의 것은 작동하지 않는다는 것이다. 두 번째 알람이 첫 번째를 죽이는 것처럼 보입니다. 자습서와 포럼에 따르면, 발생하지 않아야하는 고유 ID를 사용한다고 가정 할 때, 맞습니까? 나는 아무 문제가 함께 없다 생각다중 알림 android app

DataBase db = new DataBase(getApplicationContext());   
    String message = db.getTask(id); 

    NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE); 

    Intent notificationIntent = new Intent(this, MyActivity.class); 
    PendingIntent pendingIntent = PendingIntent.getActivity(this, id, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); 

    Notification notification = new Notification(R.drawable.ic_launcher, "You have message", System.currentTimeMillis()); 

    notification.setLatestEventInfo(this, "You 've got something to do", message, pendingIntent); 

    notification.defaults |= Notification.DEFAULT_SOUND; 
    notification.defaults |= Notification.DEFAULT_VIBRATE; 
    notificationManager.notify(id, notification); 


} 

데이터베이스 각각이 fine..So 작동 notification..And에 적합한 메시지를 얻기 위해 아이디의를 사용하고 있습니다 : 여기

는 알림 서비스 내 코드입니다 신분증. 어떤 아이디어? 내 매니 페스트 파일에 문제가있을 수 있습니까 ??

답변

0

동일한 문제가있을 수있는 사람들에게 해결책을 찾았습니다. 실제로 문제는 내 경보 관리자 코드에서 발생했습니다. 위의 코드에서와 같이 보류중인 의도에서 매개 변수로 ID를 설정하지 않았습니다. 이제 제대로 작동합니다.