Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;

import android.net.Uri;

public class Main {
    /**
     * Utility method for deleting all the elements from a given content URI. 
     * You have to provide the name of the primary key column.
     * 
     * @param ctx the context whose content resolver to use to lookup the URI
     * @param contentUri the content URI to delete all the items from
     * @param idColumn the column of the primary key for the URI
     */
    private static void deleteContentUri(Context ctx, Uri contentUri, String idColumn) {
        ctx.getContentResolver().delete(contentUri, null, null);
    }
}