google-cloud-endpoints

Error:Execution failed for task ':backend:appengineEndpointsGetClientLibs

隐身守侯 提交于 2019-12-05 18:16:12
问题 When adding a Google Cloud Endpoint backend to a Android app using the Google App Engine Java Module Template, two classes (amongst other things) are added to the project. We are then encouraged to modify these classes to our own requirements. So, I decided to delete the model class (MyBean) and the endpoint class (MyEndpoint) and replace them with my own classes. When I tried to rebuild/clean the project, I get the error message: Error:Execution failed for task ':backend

Saving blobs with Google Endpoint

做~自己de王妃 提交于 2019-12-05 14:25:32
I have an app that allows users to save blobs in the blobstore. I have a schema that does so presently, but I am interested in something simpler and less twisted. For context, imagine my app allows users to upload the picture of an animal with a paragraph describing what the animal is doing. Present schema User calls my endpoint api to save the paragraph and name of the animal in entity Animal . Note: The Animal entity actually has 4 fields ( name , paragraph , BlobKey , and blobServingUrl as String). But the endpoint api only allows saving of the two mentioned. Within the endpoint method, on

With Android, how do I set the maximum deadline for a Cloud Endpoint request?

a 夏天 提交于 2019-12-05 13:37:10
When making a ClientEndpoint API request from an Android app to an App-Engine service, how do I set a deadline/timeout for the execute() action? I'm looking for something like: Foo foo = endpoint.getSomething(id) .setDeadline(2000/*ms*/) .execute(); Rori Stumpf When building the endpoint, specify a connect and read timeout in HttpRequestInitializer. For example, in this case 20 and 10 secs respectively. SomeEndpoint.Builder endpointBuilder = new SomeEndpoint.Builder( AndroidHttp.newCompatibleTransport(), new JacksonFactory(), new HttpRequestInitializer() { public void initialize(HttpRequest

Catch Error from gapi.client.load

懵懂的女人 提交于 2019-12-05 13:21:18
I'm using Google App Engine with Java and Google Cloud Endpoints. In my JavaScript front end, I'm using this code to handle initialization, as recommended : var apisToLoad = 2; var url = '//' + $window.location.host + '/_ah/api'; gapi.client.load('sd', 'v1', handleLoad, url); gapi.client.load('oauth2', 'v2', handleLoad); function handleLoad() { // this only executes once, if (--apisToLoad === 0) { // so this is not executed } } How can I detect and handle when gapi.client.load fails? Currently I am getting an error printed to the JavaScript console that says: Could not fetch URL: https:/

AndroidStudio / gradle cannot find javax.persistence package

拥有回忆 提交于 2019-12-05 12:00:44
While attempting to do the following tutorial : https://cloud.google.com/developers/articles/how-to-build-mobile-app-with-app-engine-backend-tutorial/ using Android Studio, I created an Android Studio project and added the CheckIn.java class with the following contents : import java.util.Date; import com.google.appengine.api.datastore.Key; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class CheckIn { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private java.security.Key

Google App Engine and Android (OAuth, C2DM, or Cloud Messaging) [closed]

余生长醉 提交于 2019-12-05 11:34:15
As many users of this board I would like to develop an Android app with Google App Engine as the backend server. I need the user to log-in with his/her Google account and upload an image to the GAE server. This is what I have done so far: First I found this website about Android, GAE, and C2DM messaging . I made an effort to follow the tutorial, learned to develop android apps and how to create the Java server in GAE, but it turns out that C2DM is now deprecated! Then I started to learn about Java backends with OAuth authorization and a GAE "experimental" feature called Cloud Endpoints that is

ClientId not updated when deploying - User injected null

人走茶凉 提交于 2019-12-05 10:31:03
I am creating a project with App Engine and Cloud EndPoints using OAuth 2.0. I created and configured all the clientIds (WEB, Android and iOS), but when both I run the server in local or I deploy to App Engine PROD, I always get the following problem: WARNING: getCurrentUser: clientId 292824132082.apps.googleusercontent.com not allowed This clientId 292824132082.apps.googleusercontent.com is the default one generated automatically when you create the Cloud EndPoints the first time, and it is supposed to be overwritten when you configure you own clientIds and generate the Cloud EndPoint Client

Google Endpoints and Public Api Key

女生的网名这么多〃 提交于 2019-12-05 09:37:41
To use a Google service you can use OAuth authentication, or, if you don't need to log the user in, you can use a public api key, defining authorized domain as origin of the request. Now, I'm writing my own API using google endpoints and I will allow users to use my APIs with a public api key, and not using OAuth, there are any built-in method to do so in GAE, or I have to write my own code to verify the api key and the origin of the request to my APIs? If you are using a client key you can limit those who can access your API by defining a list of referrers in the google console, if you are

Unable to generate cloud endpoint class

隐身守侯 提交于 2019-12-05 08:56:43
Dear fellow programmers, I am very new to programming and i am following the tutorial on using app engine backend tutorial. However i face some problem along the way. I have Setup App Engine Backend Application Project, created a CheckIn entity class. After which, i follow the instruction to create a new class with the name CheckInEndPoint.java I copy the code from the snippet over to the Class. When i try to Generate Cloud Endpoint Class, i faced an error message. Error Generating API This is not a JDO/JPA entity class. Kindly seek your advice on how to troubleshoot it. https://cloud.google

endpoints.ServiceException subclass returning 400 status code instead of 409

十年热恋 提交于 2019-12-05 08:14:38
In the Cloud Endpoints documentation for exception handling, it is recommended to subclass the endpoints.ServiceException class to provide a custom http_status for 409 Conflict errors. This answer to another question indicates that some of the supported status codes get mapped by Google's infrastructure to other status codes, but 409 isn't one of the mapped status codes. Using the ConflictException class from the documentation: import endpoints import httplib class ConflictException(endpoints.ServiceException): """Conflict exception that is mapped to a 409 response.""" http_status = httplib