Java 如何设置谷歌云平台并开始在Android应用程序中使用API?
设置谷歌云平台。想用它翻译API。停止连接应用程序的步骤。 有一个img到我的步骤,我的库存 我已在Windows 10上设置了环境变量 然后是一段代码Java 如何设置谷歌云平台并开始在Android应用程序中使用API?,java,android,cloud,google-cloud-platform,gcp,Java,Android,Cloud,Google Cloud Platform,Gcp,设置谷歌云平台。想用它翻译API。停止连接应用程序的步骤。 有一个img到我的步骤,我的库存 我已在Windows 10上设置了环境变量 然后是一段代码 // If you don't specify credentials when constructing the client, the // client library will look for credentials in the environment. Storage stor
// If you don't specify credentials when constructing the client, the
// client library will look for credentials in the environment.
Storage storage = StorageOptions.getDefaultInstance().getService();
Page<Bucket> buckets = storage.list();
for (Bucket bucket : buckets.iterateAll()) {
// do something with the info
}
但我不明白我该怎么办。我的下一步是什么。以及如何将Google Cloud API连接到我的应用程序。它与刚才添加的库类似吗
有一个指南链接
有人看过android版谷歌云平台上的auth分步指南吗?使用Translate API最简单的方法是通过HTTP请求发送。我认为您应该看到RESTAPI引用,通过API键发出一个简单的POST请求,您就会明白。使用Translate API最简单的方法是使用HTTP请求发送。我认为您应该看到RESTAPI引用,通过API键发出一个简单的POST请求,您就会明白。有一个教程,在后端使用Firebase云函数。您只需要创建一个插入实时数据库的Android客户端 或者,如果您想直接从android客户端调用url api,您需要一个api密钥,该密钥可以在
要在Android中调用api url,可以使用Reformation2或FastAndroidNetworking库。但它不安全,因为您需要将api密钥放入客户端源代码中有一个教程,在后端使用Firebase Cloud函数。您只需要创建一个插入实时数据库的Android客户端 或者,如果您想直接从android客户端调用url api,您需要一个api密钥,该密钥可以在 要在Android中调用api url,可以使用Reformation2或FastAndroidNetworking库。但它不安全,因为您需要将api密钥放入客户端源代码中
https://www.googleapis.com/language/translate/v2?key=${apiKey}&source=en&target=${lang}&q=${text}