1

I have an app engine app that I want to expose its data to android app. I can test the endpoint's method just fine using curl/the explorer. However when I generated the android client using:

endpointscfg.py get_client_lib java -o . -f rest api.MyApi

and included the generated subdomain-myapp-v1-20130522125850-java-1.15.0-rc-sources.jar in the /libs folder of my android app, eclipse shows the empty package icon of com.google.api.services.mypp.model where it should contain the model class. I also tried to include the generated jar's dependencies into my android libs folder too with no result.

Thinking that my app engine implementation might be flawed, I downloaded the app engine app tictactoe and generated the client code and include it in my android app. But, still empty package. What am I missing here?

Chris
  • 5,584
  • 9
  • 40
  • 58
Aditya Wirayudha
  • 1,024
  • 12
  • 19
  • You need to write the [model classes](https://github.com/GoogleCloudPlatform/appengine-endpoints-tictactoe-android/tree/master/src/com/google/api/services/tictactoe/model) and it will not be auto generated. Maybe auto generation works when you are building a java app engine backend through Google Plugin for Eclipse. – tony m May 23 '13 at 03:33
  • 1
    Is that really the case? Because the python documentation for the generated client libraries said otherwise. – Aditya Wirayudha May 23 '13 at 05:19

1 Answers1

1

Apparently one have to extract the generated bla-bla-sources.jar inside the zip file and copied them into the Android project to make it work. Maybe I'm missing a simpler way to do it (I thought I can just include that sources.jar file like its dependencies into the Android project) but for now this is my only solution that works. I hope it helps anyone facing the same issue.

Aditya Wirayudha
  • 1,024
  • 12
  • 19
  • I went the same route. I extracted the *.java files from the jar file. `jar -xvf blah-blah-sources.jar` Then I copied the files to my Android project. – dannyhan12 Nov 14 '13 at 03:09