How do I use the Google drive API key to access drive content from android application?

五迷三道 提交于 2019-12-03 21:00:33
pommedeterresautee

You need to activate TWO things in the API console: - Drive API - Drive SDK

Many people activate only one.

Moreover, don't forget to add your real certificate SHA1 before releasing the final application.

There is this similar answer: Google Drive SDK Exception

In Android, as specified by pommedeterresautee we need to perform the activation of Both Drive API and Drive SDK, which then leads to the API Key.

This has to be set in the Android manifest inside the application tag and on par with other application component tags as :

<application...>
<activity ...>
<meta-data
        android:name="com.google.android.apps.drive.APP_ID"
        android:value="id=YOUR_API_KEY" />
</application>

When you do this, you will be able to access the api without a 403 "Access Not Configured" problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!