Accessing glassfish server from Android, emulator -
i have glassfish running on laptop. how can access real android device or emulator
if want access using httpurlconnection have simply:
httpurlconnection con = (httpurlconnection) ( new url(url)).openconnection(); con.setrequestmethod("post"); con.setdoinput(true); con.setdooutput(true); con.connect();
remember if use emulator localhost (127.0.0.1) corresponds 10.0.2.2. once have connection open can read , write using inputstream or outpustream.
if use real device sure glashfish server visible smartphone.
Comments
Post a Comment