get Calendar Event Content Uri - Android android.provider

Android examples for android.provider:ContactsContract

Description

get Calendar Event Content Uri

Demo Code


import android.content.AsyncQueryHandler;
import android.net.Uri;

public class Main{
    private static final Uri EVENT_CONTENT_URI = Uri
            .parse("content://calendar/events");
    private static final Uri EVENT_CONTENT_URI_FROYO_PLUS = Uri
            .parse("content://com.android.calendar/events");
    public static Uri getEventContentUri() {
        Uri uri;//from  www.j  av  a  2  s.c om
        if (OSUtils.atLeastFroyo()) {
            uri = EVENT_CONTENT_URI_FROYO_PLUS;
        } else {
            uri = EVENT_CONTENT_URI;
        }
        return uri;
    }
}

Related Tutorials