2015년 2월 2일 월요일

How to set your app to open a file in Google Drive

To make sure your app is included in the list of apps that can open a file in Google Drive app, you need to make some additions to your AndroidManiest.xml. The activity for opening Drive files & MIME Types that activity can open must be specified.
The following example code shows the manifest for "ViewerActivity". Your own app manifest must include a similar intent with your own appropriate values and MIME types that your app can open:

<activity
android:name="ViewerActivity"
android:label="@string/my_viewer"
android:icon="@drawable/app_icon"
android:exported="true">

<intent-filter>
<action android:name="com.google.android.apps.drive.DRIVE_OPEN">
<data android:mimetype="image/png">
<data android:mimetype="image/jpeg">
<data android:mimetype="image/jpg">
</intent-filter>
</activity>




Reference:
https://developers.google.com/drive/android/java-client




댓글 없음:

댓글 쓰기