GoogleCloudPlatform / gradle-appengine-templates

Freemarker based templates that build with the gradle-appengine-plugin
438 stars 205 forks source link

Local testing with a real device #14

Closed ericpanorel closed 10 years ago

ericpanorel commented 10 years ago

I still want to test my "backend" locally, with a real device. What should I change? Keeping this line doesn't seem to work.

.setRootUrl("http://10.0.2.2:8080/_ah/api/") // 10.0.2.2 is localhost's IP address in Android emulator

Error: I/REGISTRATION﹕ Error: failed to connect to /10.0.2.2 (port 8080) after 20000ms

loosebazooka commented 10 years ago

10.0.2.2 is your localhost from the emulators point of view. What you need to do is connect your computer and phone to the same local network and set that rootUrl value to the ip address of your computer on that network.

ericpanorel commented 10 years ago

Thanks, you lead me into the right direction!