我想在Android设备上获得最后一天的日历活动吗?我是初学者所以告诉我一步一步的解决方案..!只有获取和阅读日历不更新和删除.有人帮帮我吗?我用下面的代码!
public class Example {
public static void readCalendar(Context context) {
ContentResolver contentResolver = context.getContentResolver();
// Fetch a list of all calendars synced with the device, their display names and whether the
// user has them selected for display.
final Cursor cursor = contentResolver.query(Uri.parse("content://calendar/calendars"),
(new String[] { "_id", "displayName", "selected" }), null, null, null);
// For a full list of available columns see http://tinyurl.com/yfbg76w
HashSet<String> calendarIds = new HashSet<String>();
while (cursor.moveToNext()) {
final String _id = cursor.getString(0);
final String displayName …Run Code Online (Sandbox Code Playgroud)