How to display built in calendar in android application
Hi guysiam new to android but i got a task to display a calendar in my android application.Here my question is whether android contains built in Calendar ,if it has please post the code to display built in calendar app.
Thanks&开发者_JAVA技巧;Regards E.N.Krishna
In android ICS (4.0) There is a new API to access contents.
To display the calendar app on a date you can do like this:
Calendar today = Calendar.getInstance();
Uri uriCalendar = Uri.parse("content://com.android.calendar/time/" + String.valueOf(today.getTimeInMillis()));
Intent intentCalendar = new Intent(Intent.ACTION_VIEW,uriCalendar);
//Use the native calendar app to view the date
startActivity(intentCalendar);
Have you tried the CalendarView?
http://developer.android.com/reference/android/widget/CalendarView.html
If you want to launch the Calendar that is included by google... have a gander here for the intent you'd use.
Intent URI to go to Calendar App
精彩评论