如何通过适用于Android的Cloud Endpoints客户端库连接到非默认版本的App Engine应用程序?

时间:2021-03-10 18:19:38

The App Engine backend of my Android app is actually a non-default version of an App Engine project. However, if I connect to the App Engine backend from Android device through the Cloud Endpoints client library that is auto-generated from the backend, I see that the results retrieved indicate that I get connected to the default version of the App Engine project.

我的Android应用程序的App Engine后端实际上是App Engine项目的非默认版本。但是,如果我通过从后端自动生成的Cloud Endpoints客户端库从Android设备连接到App Engine后端,我看到检索到的结果表明我已连接到默认版本的App Engine项目。

How can I make the Android application connect to the non-default version?

如何让Android应用程序连接到非默认版本?

As always, thanks so much for your valuable advice!

一如既往,非常感谢您宝贵的建议!

1 个解决方案

#1


0  

I believe you can connect using the version specific url by using the setRootUrl method on the builder when creating the endpoint-client?

我相信在创建端点客户端时,您可以使用构建器上的setRootUrl方法使用特定于版本的URL进行连接?

myEndpointBuilder.setRootUrl("https://<versioned-address>/_ah/api/")

#1


0  

I believe you can connect using the version specific url by using the setRootUrl method on the builder when creating the endpoint-client?

我相信在创建端点客户端时,您可以使用构建器上的setRootUrl方法使用特定于版本的URL进行连接?

myEndpointBuilder.setRootUrl("https://<versioned-address>/_ah/api/")