Amazon Gift Cards

Sunday, July 11, 2010

Debugging locally with App Engine and Android

AppEngine is free, Android is free thus you think that developing for both of them is cheap and thus you start working on your backend and found out that you have to connect the AppEngine to Android, how could you enable this?

If you're in mac, there is the AppEngine software but what it does is bind your AppEngine application to localhost thus you cant access localhost in Android coz Android has its own localhost, and if you access via your ip and port on Android it might not work.

What Do I Need
Mac or Linux (If you guys can port this in Windows or it works in Windows, kindly drop a comment below)

On App Engine
On your terminal, get your IP
ifconfig | grep 192
If you're under the 192.168 IP then you can see your IP, copy this. In mac its the first 192.168.x.x. For our example we would use and bind it to 8082
cd <your AppEngine Folder -a -p 8082 .

On Android
In you App you can now access and it shall return it from values from your AppEngine. This method works as long as your in the same network thus if there are more than one programmer both could access it.

You could use Open URL Tutorial to try it out :)

No comments: