I have a function where I open the calendar of android, I pass the complete date and it opens exactly in the month of the date, well everything works but my doubt is, and possible to open in the intent of the day instead of showing the full month?
step one timestamp 2018-02-28 17:50:00 and the function opens the calendar in the 02
But what I need to do is open on the 28th.
How could I do this?
String data_raw = data_raw_;
String time = "2018/12/21 7:41:00"; // data teste
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
long data_raw_to_milleseconds = 0;
try {
Date mDate = sdf.parse(data_raw);
data_raw_to_milleseconds = mDate.getTime();
System.out.println("Date in milli :: " + data_raw_to_milleseconds);
} catch (ParseException e) {
e.printStackTrace();
}
Uri.Builder builder = CalendarContract.CONTENT_URI.buildUpon();
builder.appendPath("time");
ContentUris.appendId(builder, data_raw_to_milleseconds);
Intent intent = new Intent(Intent.ACTION_VIEW)
.setData(builder.build());
context.startActivity(intent);