android
Android app running on emulator Sync to app on localhost?
I am implementing C2DM (possibly not relevant) in an android app testing on an emulator. I have just got the C2DM registration working with the C2DM service so now I need to register my app with my web app, As my web app is in dev mode (Rails METAL server) it is running on http://localhost:3020 I need to know if this is reachable from the emulator as I'm not getting anything through to the web app when the registration ID is received in response to the Google C2DM registration process by the andropid app and I'm struggling to work out if I have an issue with my code or if this is because localhost is not reachable. Thanks in advance for any information on this UPDATE I found out from http://developer.android.com/guide/developing/devices/emulator.html#networkaddresses that 10.0.2.2 will route to 127.0.0.1 but not sure how that would help me get to http://localhost:3020 I'm using a global variable for this public static final String SERVER_BASE_URL = "http://localhost:3000"; Any ideas what I should set this to?
Try SERVER_BASE_URL = "http://10.0.2.2:3020"; as 10.0.2.2 is going to be "your host loopback interface (i.e., 127.0.0.1 on your development machine)" as per the link you posted.
Related Links
FragmentPagerAdapter in Android
can two applications in android communicate using local sockets?
How to know that Web SQL already exist?
Combo box to select city for time zone
libgdx sharedPreferences
Upload a image in flickr shows error
Listview still clickable even though is replaced by clicked fragment
How can i put pending intents in SQlite databse?
Support ActionBar and GameBaseActivity
Cordova File Transfer Crashes app
VideoView with Gesture(Swipe function) in android
screen orientation in Android Fragments
Adding third party dll in xamarin studio
adb pull dynamically created file path
how to parse json data recieved as a string
Move two VIewPagers simulataneously in one gesture