API Drive and Disk Application Integration

I have an Android application that creates its own files in Google Drive with the type mime application/vnd.test.type

I want my applications to process requests for this type of file when a Google Drive application opens, as described here .

My activity for accessing a file open in my manifest file is as follows:

  <activity android:name="DriveHandlerActivity" android:label="@string/app_name" android:icon="@drawable/icon" android:exported="true" > <meta-data android:name="com.google.android.apps.drive.APP_ID" android:value="id=MY_ID"/> <intent-filter > <action android:name="com.google.android.apps.drive.DRIVE_OPEN"/> <data android:mimeType="application/vnd.test.type"/> </intent-filter> </activity> 

When I try to open a file in a Google Drive application, I get the "Open with ..." dialog box, as expected, with my application, which will appear as the only record that can work with this type of file. Unfortunately, after confirming the action, I get a dialogue that says.

Error Dialog

My only option is to click the "Cancel" button, which will return me to the Google Drive app.

I'm not quite sure that I have metadata, since the identifier refers to the use of different names depending on where you look. In some documents (see here at 26:44) . I tried using the "Project ID" specified in my Google Apis Console, as well as the project number (from the URL) on the same page. I get the same error, no matter what value I choose as identifier.

As far as I know, the next step should be to process the intent in my application, but because of the error described, the intent never comes. Can someone tell me what I am doing wrong?

+7
source share
1 answer

There is currently a problem requiring your application to appear in the Chrome Web Store (even for trusted testers) for an Open With thread to work.

However, even if the problem is resolved, your application will not be able to access the file until the Google Play Services API is released. The only work around will be to request authorization for the full amount of the Drive https://www.googleapis.com/auth/drive , which is not recommended but useful for debugging.

I will update this answer when the restrictions for the Chrome Web Store are removed.

+3
source

All Articles