Saurabh Verma
Saurabh Verma

Reputation: 6728

ContentProvider for Google Drive

My app requires to access some of the Content Providers and Google Drive is one of them. However, from my search I could not see any provider exposed by GoogleDrive. I have used the follwing code to print all the ContentProviders

for (PackageInfo pack : getPackageManager().getInstalledPackages(PackageManager.GET_PROVIDERS)) {
        ProviderInfo[] providers = pack.providers;
        if (providers != null) {
            for (ProviderInfo provider : providers) {
                Log.d("TEST", "provider: " + provider.authority);
            }
        }
    }
}

I could see providers like:

com.google.android.apps.docs

com.google.android.apps.docs.files.

but could not find the name 'drive' in the list. So does this mean that GoogleDrive has not exposed its contents ??

EDIT: From what I understand, it seems that we can access different components of Google Drive through different providers. eg we can access all the docs in GoogleDrive through the content provider given by Google Docs.

However, I'm still not sure of how to access videos or songs stored in GoogleDrive !!

Upvotes: 1

Views: 1116

Answers (2)

TWiStErRob
TWiStErRob

Reputation: 46480

Simple historical reasons, from a user perspective Google Docs was renamed to Google Drive mid 2012.

Try http://docs.google.com and also see url of Google Drive app in Play Store: https://play.google.com/store/apps/details?id=com.google.android.apps.docs

I think the content provider predates Google Drive and they didn't want to make a breaking change.

Upvotes: 0

astryk
astryk

Reputation: 1255

As of Google I/O G Drive is a content provider now.

Upvotes: 1

Related Questions