Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/*
 *    Copyright (c) 2012 Hai Bison
 *
 *    See the file LICENSE at the root directory of this project for copying
 *    permission.
 */

import java.util.HashMap;
import java.util.Map;

import android.os.Bundle;

public class Main {
    /**
     * Map of provider ID to its authority.
     * <p/>
     * <b>Note for developers:</b> If you provide your own provider, use
     * {@link #registerProviderInfo(String, String)} to register it..
     */
    private static final Map<String, Bundle> MAP_PROVIDER_INFO = new HashMap<String, Bundle>();
    private static final String COLUMN_AUTHORITY = "authority";

    /**
     * Registers a file provider.
     * 
     * @param id
     *            the provider ID. It should be a UUID.
     * @param authority
     *            the autority.
     */
    public static void registerProviderInfo(String id, String authority) {
        Bundle bundle = new Bundle();
        bundle.putString(COLUMN_AUTHORITY, authority);
        MAP_PROVIDER_INFO.put(id, bundle);
    }
}