get Instances Uri for ContentUris - Android android.content

Android examples for android.content:ContentUris

Description

get Instances Uri for ContentUris

Demo Code


//package com.java2s;

import android.content.ContentUris;

import android.net.Uri;

import android.provider.CalendarContract.Instances;

public class Main {
    private static Uri getInstancesUri(final String getDataMilliSeconds) {
        final Uri.Builder builder = Instances.CONTENT_URI.buildUpon();
        // StartDate
        ContentUris.appendId(builder, Long.valueOf(getDataMilliSeconds));
        // EndDate
        ContentUris.appendId(builder, Long.valueOf(getDataMilliSeconds));
        return builder.build();
    }//from   w ww  .  j  ava 2  s.c o  m
}

Related Tutorials