Google Sheets API V4,以更少的步骤读取公共表格 [英] Google Sheets API V4 for reading public sheet with less steps

查看:194
本文介绍了Google Sheets API V4,以更少的步骤读取公共表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想提供一个公开表的参考列表,每个人都可以在android中查看. 我尝试了来自Google的快速入门示例,效果很好.

We would like to provide a list of reference from a public sheets that everyone can view in android. I tried the Quickstart sample from Google which works just fine.

但是我们想最小化步骤(例如允许访问联系人,选择Google帐户之类的步骤),因为该应用程序是为正在考虑自杀的人设计的.该列表包含有关在哪里寻求帮助的信息.

But we would like to minimize the steps (steps like allow access to contacts, choosing google account) since this apps is designed for people who's considering suicide. The list is fill of info about where to ask for help.

我确实找到了有关如何读取工作表的文章一个InputStream

如果使用Google Sheet API V4有更优雅的方式,我将不胜感激

I would really appreciate if there's more elegant way with Google Sheet API V4

推荐答案

我发现com.google.api.services.sheets.v4.Sheets中有一个setKey方法.对于Builder中的第三个参数,作为凭据,可以为null.但是,如果密钥仅限于Android,则会出现错误此Android客户端应用程序的请求被阻止".

I found out there's a setKey method in com.google.api.services.sheets.v4.Sheets. For the third parameter in Builder, as credential, can be null. But will have error "Requests from this Android client application are blocked" if the Key restricted to Android.

这篇关于Google Sheets API V4,以更少的步骤读取公共表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆