Q:

How can I use a datepicker to set a reminder on a specific date?

I have a datepicker which can be used to pick a date and set it to a edittext. how can i  set a reminder on the date ?.
The program for setting a edittext from the date picker is given below:
import android.app.DatePickerDialog;
import android.content.DialogInterface; 
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.DatePicker;
import android.widget.EditText;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

public class MainActivity extends AppCompatActivity {

   Calendar myCalendar= Calendar.getInstance();
   private EditText et;
   @Override
   protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      et =(EditText)findViewById(R.id.editText3);
    }

  DatePickerDialog.OnDateSetListener date =new 
  DatePickerDialog.OnDateSetListener(){
     @Override
     public void onDateSet(DatePicker view, int year, int monthOfYear,
                           int dayOfMonth) {
         // TODO Auto-generated method stub
         myCalendar.set(Calendar.YEAR, year);
         myCalendar.set(Calendar.MONTH, monthOfYear);
         myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
         updateLabel();
     }
 };

 public void onClick(View v) {
     // TODO Auto-generated method stub
     new DatePickerDialog(MainActivity.this, date, myCalendar
             .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
             myCalendar.get(Calendar.DAY_OF_MONTH)).show();

 }

 private void updateLabel() {

     String myFormat = "MM/dd/yy"; //In which you need put here
     SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);

     et.setText(sdf.format(myCalendar.getTime()));
  }
}

A:

Try this:
private void setAlarm(Calendar target){
    Intent intent = new Intent(getBaseContext(), AlarmReceiver.class);
    PendingIntent pendingIntent = PendingIntent.getBroadcast(getBaseContext(), 1, intent, 0);
    AlarmManager alarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
    alarmManager.set(AlarmManager.RTC_WAKEUP, target.getTimeInMillis(), pendingIntent);
}

Let me know if it helped you.
UPDATE: 
And alarmReciever must be something like this:
 public class AlarmReceiver extends BroadcastReceiver {

 @Override
 public void onReceive(Context context, Intent intent) {

  Toast.makeText(context, 
   "AlarmReceiver.onReceive()", 
   Toast.LENGTH_LONG).show();
 }

}

And add it to your manifest.xml inside the application tag:
<receiver android:name=".AlarmReceiver" android:process=":remote" />

