Very Good Morning to All ..Am created Android Apps to prepare Schedule task..for my task I wants to create Notification Remainder for My Task..I dont have any coding to create that...I google this topic But I didint Get Any proper solution..Please Help Me anyone...Thanks in advance..
Here My coding..for insert datetime in edittext box:
MainActivity.java:
EditText edtdate;
private ImageButton ib;
private Calendar cal;
private int day ,month ,year;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.add_inbox);
edtdate = (EditText) findViewById(R.id.edtdate);
cal = Calendar.getInstance();
day = cal.get(Calendar.DAY_OF_MONTH);
month = cal.get(Calendar.MONTH);
year = cal.get(Calendar.YEAR);
cal.add(Calendar.HOUR, heure);
Intent intent1 = new Intent(this, MyBroadcastReceiver.class);
PendingIntent sender = PendingIntent.getBroadcast(this, 0, intent1,
PendingIntent.FLAG_UPDATE_CURRENT);
AlarmManager am = (AlarmManager) this .getSystemService(Context.ALARM_SERVICE);
am.setRepeating(AlarmManager.RTC_WAKEUP,
cal.getTimeInMillis(),
heure*3600*1000, sender);
custom = new CustomDateTimePicker(this, new
CustomDateTimePicker.ICustomDateTimeListener() {
@Override
public void onSet(Dialog dialog, Calendar calendarSelected,
Date dateSelected, int year, String monthFullName,
String monthShortName, int monthNumber, int date,
String weekDayFullName, String weekDayShortName,
int hour24, int hour12, int min, int sec,
String AM_PM)
{
((EditText) findViewById(R.id.edtdate))
.setText(calendarSelected
.get(Calendar.DAY_OF_MONTH)
+ "/" + (monthNumber+1) + "/" + year
+ ", " + hour12 + ":" + min
+ " " + AM_PM);
}
@Override
public void onCancel() {
}
});
}
});
custom.set24HourFormat(false);
custom.setDate(Calendar.getInstance());
findViewById(R.id.imageButton1).setOnClickListener(
new OnClickListener() {
@Override
public void onClick(View v) {
custom.showDialog();
}
});
}
CustomDateTimePicker custom;