While I agree that running a web server of any sort on the android phone/tablet is pretty pointless compared to todays entry level cheap hardware.. most of these devices are more powerful and capable than my development machine was 6..maybe 7 or so years ago, and we wrote cod while running a database and web server on those. As some of you said..it's possible.. heck it could probably handle a decent load too. Given that I *think* there are now ARM based servers being built, I could see where rather than buying a beefy multi-cpu 2+ rack system, you could put a bunch of these in place as servers to handle a few dozen or so requests and with almost no heat and enough power and memory to handle the requests.. a farm of these could possibly be comparable to much more expensive, heat dissipating hardware that runs multiple vms. At the very least it would be pretty cool to see a table full of hundreds of these, all via wifi, just servicing web requests ;)
On Wed, Jan 9, 2013 at 3:25 PM, Kristopher Micinski <krismicin...@gmail.com>wrote: > Yes, but doing that (as I said) lends itself to an everlasting > service: you certainly can't run that code on the UI thread (it will > simply barf with an exception), and so the sensible place to put it is > in a service.. There might be times when this is acceptable, but you > should think about it carefully before doing so to make sure there > isn't a better solution. > > Kris > > On Wed, Jan 9, 2013 at 6:06 PM, bob <b...@coolfone.comze.com> wrote: > > You can definitely create a TCP server on Android. > > > > The code would look like this: > > > > ServerSocket serverSocket = null; > > boolean listening = true; > > > > try { > > serverSocket = new ServerSocket(1101); > > } catch (IOException e) { > > System.err.println("Could not listen on port: 1101."); > > System.exit(-1); > > } > > > > while (listening) > > new Server_Thread(serverSocket.accept()).start(); > > > > serverSocket.close(); > > > > > > > > > > On Wednesday, January 9, 2013 3:41:22 AM UTC-6, tom wrote: > >> > >> Hi, > >> > >> why couldn't create webservice using android? > >> if that any reason. if you know that reason...please share with me.. > >> > >> Thanks, > >> Tom > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > > http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en