I have replied to the thread that you asked, for the sake of keeping
this info together I am also going to add my solution to this thread
in case someone stumbles across it.
Thanks!
************************
Hi Yoav, and List/Group.
Thanks for your response to my question on getting the C2DM example
working, so I'm replying here like you asked if I managed to get it
right.
Although I have only read your reply now, I did manage to figure it
out in the early hours this morning :)
To fill the rest of the group in, I have been having major issues
trying to get the sample app engine connected android project working.
I could not register my android device (using AVD and my HTC mobile)
to the C2DM service when debugging locally, although deploying the app
to AppEngine and accessing it as a production environment worked.
From what I read you have to make sure that you are using Google API's
level 8 for 2.2 (Not Android SDK) on your android project, and the
ADV, as a minimum. As well as have a working google accounts setup on
the phone in Settings -> Accounts. This was the only change required
for me to run the sample application that gets built for you in
Eclipse when you start a new AppEngine connected Android product, an
from what I have tested also gets the CloudTasks running on a local
dev environment.
You were correct in saying that it had to do with my setup, more
specifically it has to do with the App Engine DevAppServer
configuration in Eclipse.
The root cause being that app engine internal server is set to bind
only to the localhost, now obviously if you try and access 127.0.0.1
from the android device its going to point to the device itself, and
not your dev environment, so to change this you need to change the
startup arguments and add the "-bindAddress 0.0.0.0". Right-click on
your project -> Debug As -> Debug Configuration, select your AppEngine
project/sample application and select the Arguments tab, in the
"Program Arguments" edit box is where you edit the startup arguments.
The port is already set, so you have to add the BindAddress argument,
I added it in after the port so that part looked like this "-port 8888
-bindAddress 0.0.0.0".
This will bind the AppEngine server to all addresses and not just
localhost.
Then to access your dev/debug app engine server by its ethernet IP or
for some reason using 10.0.2.2 to connect to my local server worked
from Android Virtual Device, I read somewhere that it creates that
virtual IP, although I am still to find any documentation on that...
For Interest sake I am running Eclipse Helios version, with GPE 2.4
beta, GWT 1.5, and the latest android SDK's. Ubuntu 10.10 64-bit OS.
On May 24, 7:04 am, Yoav <
yol...@gmail.com> wrote:
> Hi,
>
> Problem doesn't seems to be related to the specific application you
> run.
> Apparently it is related to the eclipse configuration. Try first to
> run simpler
> sample application.
> Once you are sure the IDE is OK try to run the sample application
> which
> is built in the plugin
> (new->project-> Android -> App Engine Connected Android App) to that
> your
> user is really registered in the c2dm system.
> Now you can try running the dream application.
>
> Good luck!
> Yoav
>
> If all goes well and you manage to run it, please let me know here:
http://groups.google.com/group/android-c2dm/browse_thread/thread/f32d...
>
> On May 23, 4:12 pm, Brad8711 <
brad8...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi Everyone,
>
> > So after pondering a while about how exactly to go about building my
> > Android app, I came across the Android + App Engine: A Developer's
> > Dream Combination video and is exactly what I need!
>
> > Now in the video and the tutorials I've seen everything gets up and
> > running right from the start after creating a new app engine linked
> > project.
> > When I try and run it on the android emulator I get a "WARN/
> > DeviceRegistrar(489): Failure, got :Connection tohttp://
127.0.1.1:8888
> > refused"
> > I have selected the android app to use the Google API's version 8 for
> > 2.2 and the GWT / App Engine project is set to use the 2.4 plugin and
> > 1.5 GAE SDK's.
>
> > I have also tried this on my HTC Desire in debug mode, as well as
> > changing the URL tohttp://127.0.0.1:8888asthats where the GWT part