here are two ways to pass the start time and end time values:::
long startTime = System.currentTimeMillis() - 24*1000 * 60 * 60;
long endTime = System.currentTimeMillis() + 48*1000 * 60 * 60 * 2;
(or)
Date date=(new SimpleDateForma
long startTime=date.get
Date date2=(new SimpleDateForma
long endTime=date2.g
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("title", "Some title");
intent.putExtra("description", "Some description");
intent.putExtra("beginTime", startTime);
intent.putExtra("endTime", endTime);
startActivity(intent);
No comments:
Post a Comment