실력이 모자라다보니 계속 헤매내요.. 고수분들의 도움을 얻고자 올려봅니다..ㅜ.ㅜ

AlarmTest.java
------------------------------------

package my.AlarmTest;

import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;

import android.app.Activity;
import android.app.AlarmManager;
import android.app.DatePickerDialog;
import android.app.PendingIntent;
import android.app.TimePickerDialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.SystemClock;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.TextView;
import android.widget.TimePicker;

public class AlarmTest extends Activity {
 
 
 Calendar calendar = Calendar.getInstance();
    TextView textview;
   
    DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener()
    {
        public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth)
        {
            calendar.set(Calendar.YEAR, year);
            calendar.set(Calendar.MONTH, monthOfYear);
            calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
            updateDateTime();
        }
    };

    TimePickerDialog.OnTimeSetListener time = new TimePickerDialog.OnTimeSetListener()
    {
        public void onTimeSet(TimePicker view, int hourOfDay, int minute)
        {
            calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
            calendar.set(Calendar.MINUTE, minute);
            updateDateTime();
        }
    };

 


 
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
 
       
    //timepicker시작
       
       
        // ***********************************
        // 날짜 설정
        // ***********************************
        final Button buttonDate = (Button) findViewById(R.id.Button01);

        buttonDate.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                new DatePickerDialog(AlarmTest.this,
                    date,
                    calendar.get(Calendar.YEAR),
                    calendar.get(Calendar.MONTH),
                    calendar.get(Calendar.DAY_OF_MONTH)).show();
            }
        });

        // ***********************************
        // 시간  설정
        // ***********************************
        final Button buttonTime = (Button) findViewById(R.id.Button02);

        buttonTime.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                new TimePickerDialog(AlarmTest.this,
                    time,
                    calendar.get(Calendar.HOUR_OF_DAY),
                    calendar.get(Calendar.MINUTE),
                    false).show();
            }
        });

        // ***********************************
        // 설정된 날짜/시간 표시
        // ***********************************
        textview = (TextView) findViewById(R.id.TextView01);
        updateDateTime();
       
        //끝

       
       
        Button btn;
        btn = (Button)findViewById(R.id.onetime);
        btn.setOnClickListener(mClick);
    
       
               
     }
   
   
     Button.OnClickListener mClick = new Button.OnClickListener(){
      public void onClick(View v){
       AlarmManager am = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
       Intent intent;
       PendingIntent sender;
       
       switch (v.getId()){
       case R.id.onetime:
        
        
        intent = new Intent(AlarmTest.this, AlarmReceiver.class);
        sender = PendingIntent.getBroadcast(AlarmTest.this, 0, intent, 0);
        
        
        Calendar calender = Calendar.getInstance();
       // calender.setTimeInMillis(System.currentTimeMillis());
      //  calender.add(Calendar.SECOND, 10);       
        
       
        //알람 등록
       am.set(AlarmManager.RTC, calender.getTimeInMillis(), sender);

  
        
       } 
      }
      
     };
     
       private void updateDateTime() {
             Date date = calendar.getTime();
             DateFormat mDateFormat = DateFormat.getDateTimeInstance();
             String strDateTime = mDateFormat.format(date);
             textview.setText(strDateTime);
       
            
         }   
   
}
   
-----------------------------------------
AlarmReceiver.java
-----------------------------------------

package my.AlarmTest;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;

public class AlarmReceiver extends BroadcastReceiver {
 
 @Override
 public void onReceive(Context context, Intent intent) {
  Toast.makeText(context, "it's time to start", Toast.LENGTH_LONG).show();
  
 }
}

-------------------------------------------

매니페스트
--------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="my.AlarmTest"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".AlarmTest"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>


<receiver android:name=".AlarmReceiver" android:process=":remote" />

</application>

</manifest>

---------------------------------------------------

사실 교재를 통해 이런 저런 소스를 섞다보니 참 지저분하게 되었네요..
원래는 한번 누르면 알람매니저를 통해 토스트가 한번 뜨는 소스와
TimePicker, DatePicker로 시간을 찍어주는 소스가 섞여 있습니다..

제 생각에는 TimePicker, DatePicker로 시간을 얻은 후, AlarmManager에 시간을 넣어 작동되도록 하면 될거 같은데..
시간을 어디에 넣어야 할지도 모르겠네요.. 그리고 얻은 시간도 형변환을 해야 할거 같은데.. 그것도 잘 모르겠구요..ㅜ.ㅜ

고수분들의 도움 간절히 기다리고 있습니다.. 조금이라도 좋으니 꼭 조언 부탁드릴게요..ㅜ.ㅜ
소스도 첨부하겠습니다..