Android Open Source - anluwage Provider Meta Data Utils






From Project

Back to project page anluwage.

License

The source code is released under:

GNU General Public License

If you think the Android project anluwage listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.sudocode.mrsq.pricer.utils;
/*from www  .  j a v a2  s . c  om*/
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.ComponentName;
import android.content.ContentProvider;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;

/**
 * Created by RM on 1/25/14.
 */
public class ProviderMetaDataUtils {

    @TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static <T extends ContentProvider> Bundle getProviderMetaData(T contentProvider)
            throws PackageManager.NameNotFoundException {
        ComponentName provider = new ComponentName(contentProvider.getContext(), contentProvider.getClass());
        PackageManager manager = contentProvider.getContext().getPackageManager();
        return manager.getProviderInfo(provider, PackageManager.GET_META_DATA).metaData;
    }

}




Java Source Code List

com.sudocode.android.commons.helper.ExceptionMessageExtractor.java
com.sudocode.content.provider.api.AnnotationBasedProviderDatabaseHelper.java
com.sudocode.content.provider.api.AnnotationBasedProvider.java
com.sudocode.content.provider.api.ProviderModel.java
com.sudocode.content.provider.api.TableModelConstants.java
com.sudocode.content.provider.api.annotation.Column.java
com.sudocode.content.provider.api.annotation.ForeignField.java
com.sudocode.content.provider.api.annotation.Id.java
com.sudocode.content.provider.api.annotation.InitScripts.java
com.sudocode.content.provider.api.annotation.Provider.java
com.sudocode.content.provider.api.annotation.Table.java
com.sudocode.content.provider.api.dao.AnnotationBasedDaoSupport.java
com.sudocode.content.provider.api.dao.AnnotationBasedDao.java
com.sudocode.content.provider.api.dao.GenericAnnotationBasedDao.java
com.sudocode.content.provider.api.dao.exception.AnnotationBasedDaoException.java
com.sudocode.content.provider.api.dao.exception.UnableToSaveRecordException.java
com.sudocode.content.provider.api.exception.AnnotationBasedProviderException.java
com.sudocode.content.provider.api.exception.AnnotationBasedProviderRuntimeException.java
com.sudocode.content.provider.api.support.application.AnnotationBasedDaoInitializer.java
com.sudocode.content.provider.api.support.application.GenericAnnotationBasedDaoInitializer.java
com.sudocode.mrsq.pricer.utils.ProviderMetaDataUtils.java