Uri uri = intent.getData();
Intent intent2 = new Intent(context, MainActivity.class);
String myjo = intent.getStringExtra("jonum");
PendingIntent pender = PendingIntent.getActivity(context, 0, intent2, PendingIntent.FLAG_UPDATE_CURRENT);
notify.setLatestEventInfo(context, "시작",myjo , pender);
notify.flags |= Notification.FLAG_AUTO_CANCEL;
notify.vibrate = new long[] { 900, 200, 500, 200 ,200 ,500 ,600};
if(uri!=null||uri.toString().length()>0){
notify.sound = uri;
}else{
notify.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
}
notify.number++;
notifier.notify(1, notify);
메인 엑티비티에서 알람음을 선택하면 선택한 알람음Uri를 보내서 사운드를 내고
아니면 기본알람음을 내도록 만들었습니다.
기본알람음은 한번 울리고 끝나는데
알람음을 선택하면 상태창을 키기전까지 반복해서 알람 소리가 나오고 있습니다. (__);