이렇게 코딩을 하면 안드로이드 핸드폰 mp3파일이 알람으로 설정할수 있더라고요

하지만 여기서 나오는 확인 취소 버튼중 취소 버튼을 누르면 예상치 못한 에러로 어플이 처음부터

실행 되네요 그리고 백키를 누르면 똑같은 증상이 떠요 이거 처리할 방법 없나요

 

 

// 알람 음
        ( ( ImageView )findViewById( R.id.alarm_set_go_sound ) ).setOnClickListener( new OnClickListener(){
         @Override
         public void onClick(View v) {
          startActivityForResult( new Intent( RingtoneManager.ACTION_RINGTONE_PICKER ), 0 );
         
         

          

         }
        });
       


--------------------sound_manager.java
package pkg.alarm;

import java.util.*;

public class sound_manager {
 
 public static ArrayList< sound > list = new ArrayList< sound >();
 
 public static void init(){
 }
 
 public static int get_res_id( int i ){
  return list.get( i ).res_id;
 }
 
 public static String get_title( int i ){
  return list.get( i ).title;
 }
}

-----------------------sound.java
package pkg.alarm;

public class sound{
 public int  res_id; // 리소스 번호
 public String title; // 제목
 
 public sound( int _res_id, String _title ){
  res_id = _res_id;
  title = _title;
 }
}