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

Categories

HOME
developer-tools
formal-languages
pda
fftw
seo
tivoli
rom
google-cloud-datalab
vert.x
accessibility
fosrestbundle
drop-down-menu
ibeacon-android
text-mining
onedrive-api
mongodb-csharp
entitymanager
dynamic-sql
foreign-keys
production
microsoft-ocr
breadth-first-search
dataflow-diagram
string-concatenation
hta
flask-sqlalchemy
froala
jquery-multiselect
appirater
firebase-analytics
cppreference
tizen-tv
python-2.6
complex-numbers
jmockit
clickjacking
cin
p4merge
resolution
postgresql-8.4
install.packages
plr
magento-2.0.7
hammer.js
tinymce-3
posixct
payara-micro
sundials
google-photos
vibrate
stripe-connect
builtins
mapinfo
eigenvector
kango-framework
nupic
mobiledoc-kit
maybe
character-replacement
gocql
roadkill-wiki
pax-exam
visual-sourcesafe-2005
avahi
google-refine
mraid
node-serialport
android-broadcast
openbabel
procedural-programming
grouping-sets
exceldatareader
big-ip
strawberry-perl
unix-socket
named-parameters
template-deduction
terminate
maven-scm
square-bracket
amslidemenu
cffile
stacky
cardreader
mkv
fusefabric
winmain
http-daemon
cdonts
nhprof
maven-1
dot-emacs
tabpanel
request-headers
dojo-dnd
soappy
lemmatization
appliance

Resources

Encrypt Message