밑에 소스코드 입니다. 설정된 시간에 벨소리를 울리고 싶은데 밑에 큰 글씨로 해놓은 부분만 조금 수정 하면 될꺼같은데

자꾸 set 버튼 클릭시 바로 벨소리가 울리네요 ㅠㅠ 어떻게 해야될까요?

 

 

public class AlramActivity extends Activity
implements OnDateChangedListener, OnTimeChangedListener {
 /*
  * 알람관련 맴버 변수
  */
  // 알람 메니저
  private AlarmManager mManager;
  // 설정 일시
  private GregorianCalendar mCalendar;
  //일자 설정 클래스
  private DatePicker mDate;
  //시작 설정 클래스
  private TimePicker mTime;
 
 
  private long nowTime;
 /*
  * 통지 관련 맴버 변수
  */
  private NotificationManager mNotification;
 
  public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);

   //통지 매니저를 취득
   mNotification = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);

 

   //알람 매니저를 취득
   mManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);

   //현재 시각을 취득
   mCalendar = new GregorianCalendar();
   Log.i("HelloAlarmActivity",mCalendar.getTime().toString());

   //셋 버튼, 리셋버튼의 리스너를 등록
   setContentView(R.layout.main);
    Button b = (Button)findViewById(R.id.set);
    b.setOnClickListener (new View.OnClickListener() {
    public void onClick (View v) {
     setAlarm();
    }
   });
   
    Button c = (Button)findViewById(R.id.reset);
    c.setOnClickListener(new View.OnClickListener() {
     public void onClick(View v) {
      resetAlarm();
     }
    });

 

 

   //일시 설정 클래스로 현재 시각을 설정
   mDate = (DatePicker)findViewById(R.id.date_picker);
   mDate.init (mCalendar.get(Calendar.YEAR), mCalendar.get(Calendar.MONTH), mCalendar.get(Calendar.DAY_OF_MONTH), this);
   mTime = (TimePicker)findViewById(R.id.time_picker);
   mTime.setCurrentHour(mCalendar.get(Calendar.HOUR_OF_DAY));
   mTime.setCurrentMinute(mCalendar.get(Calendar.MINUTE));
   mTime.setOnTimeChangedListener(this);
  
   mCalendar = new GregorianCalendar();
   Log.i("HelloAlarmActivity",mCalendar.getTime().toString());
   nowTime = mCalendar.getTimeInMillis();
   }
 
   //알람의 설정
   private void setAlarm() {
    if(nowTime >= mCalendar.getTimeInMillis()){
     Toast.makeText(AlramActivity.this, "입력한 날짜는 현재 날짜보다 이전입니다.", Toast.LENGTH_SHORT).show();
     return;
     }
     mManager.set(AlarmManager.RTC_WAKEUP, mCalendar.getTimeInMillis(), pendingIntent());

   }
 
   //알람의 해제
   private void resetAlarm() {
    mManager.cancel(pendingIntent());
   }

   //알람의 설정 시각에 발생하는 인텐트 작성
   private PendingIntent pendingIntent() {
    Intent i = new Intent(getApplicationContext(), AlramActivity.class);
     PendingIntent pi = PendingIntent.getActivity(this, 0, i, 0);
     return pi;

 

설정된 시간을 위해 제가 추가한 소스 부분

/*

int icon = R.drawable.icon;
String tickerText = "알림";
long when = System.currentTimeMillis();

Notification noti = new Notification(icon, tickerText, when);
noti.sound = Uri.withAppendedPath(Audio.Media.INTERNAL_CONTENT_URI, "6");//ringURI;
Log.v("LEE", "mNotification11");
noti.setLatestEventInfo(Alram.this,"111", "222", pi);
mNotification.notify(1234, noti); // NOTIFICATION_ID의 고유 ID를 가지는 notification을 표시합니다.
Log.v("LEE", "mNotification22");
return pi;

*/

 


    }

 

   //일자 설정 클래스의 상태변화 리스너
   public void onDateChanged (DatePicker view, int year, int monthOfYear, int dayOfMonth) {
    mCalendar.set (year, monthOfYear, dayOfMonth, mTime.getCurrentHour(), mTime.getCurrentMinute());
    Log.i("HelloAlarmActivity", mCalendar.getTime().toString());
    }

   //시각 설정 클래스의 상태변화 리스너
   public void onTimeChanged (TimePicker view, int hourOfDay, int minute) {
    mCalendar.set (mDate.getYear(), mDate.getMonth(), mDate.getDayOfMonth(), hourOfDay, minute);
    Log.i("HelloAlarmActivity",mCalendar.getTime().toString());
   }
 }