Hi, I need to create an application(using 2 emulators) in which: Each emulator serves as a server and a client.
Server starts as a service in background. On request by the client, I have to transfer the contents of a JSON file from 1 emulator's server to other emulator's client.. Can you please guide me in the usage of how to use port numbers(as the IP addresses of both instances of the emulator is the same)?
No sure that will work if both emulators have the same IP address.
I'd try running server & client programs in the same emulator. For the server use any port number between 1025 & 65535 that is not already used, ports below 1024 are generally reserve in linux/unix system & need su rights.
On Friday, October 5, 2012 5:54:45 PM UTC+10, Archana wrote:
> Hi, I need to create an application(using 2 emulators) in which: Each > emulator serves as a server and a client.
> Server starts as a service in background. On request by the client, I have > to transfer the contents of a JSON file from 1 emulator's server to other > emulator's client.. Can you please guide me in the usage of how to use port > numbers(as the IP addresses of both instances of the emulator is the same)?
> Thank you!
> On Friday, October 5, 2012 5:48:19 AM UTC+3, gjs wrote:
On Sunday, October 7, 2012 10:19:14 AM UTC+3, gjs wrote:
> Hi,
> No sure that will work if both emulators have the same IP address.
> I'd try running server & client programs in the same emulator. For the > server use any port number between 1025 & 65535 that is not already used, > ports below 1024 are generally reserve in linux/unix system & need su > rights.
> Regards
> On Friday, October 5, 2012 5:54:45 PM UTC+10, Archana wrote:
>> Hi, I need to create an application(using 2 emulators) in which: Each >> emulator serves as a server and a client.
>> Server starts as a service in background. On request by the client, I >> have to transfer the contents of a JSON file from 1 emulator's server to >> other emulator's client.. Can you please guide me in the usage of how to >> use port numbers(as the IP addresses of both instances of the emulator is >> the same)?
>> Thank you!
>> On Friday, October 5, 2012 5:48:19 AM UTC+3, gjs wrote:
On Thu, Oct 4, 2012 at 1:57 AM, Archana <ramalingam.arch...@gmail.com> wrote:
> Hi, I want to develop HTTP server in Android. I used the link
> https://gist.github.com/1893396#gistcomment-582451 NanoHTTPD. But when I
> open the page http://10.0.2.15:8080, I am getting WebPage not found. In the
> logs, I am getting
> 10-04 05:55:39.106: E/Tab(499): onReceivedError -6 http://10.0.2.15:8697/ > The connection to the server was unsuccessful.
> Can anyone please tell me what the error is about? Or is there any other way
> to implement a HTTP server in Android?
> Thanks in advance!
> --
> 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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
On Monday, October 8, 2012 9:41:34 AM UTC+3, Kristopher Micinski wrote:
> Listen... Why do you want to implement an HTTP server in Android...
> There are just, so many reasons this is a bad idea. The only > acceptable one might be "this is for fun and I'm just doing it to play > around."
> But for any kind of real application, you'd want to do something else, > and I'd really urge you to look into something like GCM.
> kris
> On Thu, Oct 4, 2012 at 1:57 AM, Archana <ramalinga...@gmail.com<javascript:>> > wrote: > > Hi, I want to develop HTTP server in Android. I used the link > > https://gist.github.com/1893396#gistcomment-582451 NanoHTTPD. But when > I > > open the page http://10.0.2.15:8080, I am getting WebPage not found. In > the > > logs, I am getting
> > 10-04 05:55:39.106: E/Tab(499): onReceivedError -6 > http://10.0.2.15:8697/ > > The connection to the server was unsuccessful.
> > Can anyone please tell me what the error is about? Or is there any other > way > > to implement a HTTP server in Android?
> > Thanks in advance!
> > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-d...@googlegroups.com<javascript:> > > To unsubscribe from this group, send email to > > android-developers+unsubscribe@googlegroups.com <javascript:> > > For more options, visit this group at > > http://groups.google.com/group/android-developers?hl=en
It's sort of dubious as to why you would do a research project using
an HTTP server in Android, what you probably want is cross device
messaging, in which case your purposes would be much better served
using GCM
On Mon, Oct 8, 2012 at 3:01 AM, Archana <ramalingam.arch...@gmail.com> wrote:
> I m doing a research project. The requirement is to implement HTTP server. I
> will look at GCM as well. Any help is welcome.
> Thanks!
> On Monday, October 8, 2012 9:41:34 AM UTC+3, Kristopher Micinski wrote:
>> Listen... Why do you want to implement an HTTP server in Android...
>> There are just, so many reasons this is a bad idea. The only
>> acceptable one might be "this is for fun and I'm just doing it to play
>> around."
>> But for any kind of real application, you'd want to do something else,
>> and I'd really urge you to look into something like GCM.
>> kris
>> On Thu, Oct 4, 2012 at 1:57 AM, Archana <ramalinga...@gmail.com> wrote:
>> > Hi, I want to develop HTTP server in Android. I used the link
>> > https://gist.github.com/1893396#gistcomment-582451 NanoHTTPD. But when I
>> > open the page http://10.0.2.15:8080, I am getting WebPage not found. In
>> > the
>> > logs, I am getting
>> > 10-04 05:55:39.106: E/Tab(499): onReceivedError -6
>> > http://10.0.2.15:8697/ >> > The connection to the server was unsuccessful.
>> > Can anyone please tell me what the error is about? Or is there any other
>> > way
>> > to implement a HTTP server in Android?
>> > Thanks in advance!
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-d...@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-developers+unsubscribe@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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
On Sunday, October 7, 2012 6:19:14 PM UTC+11, gjs wrote:
> Hi,
> No sure that will work if both emulators have the same IP address.
> I'd try running server & client programs in the same emulator. For the > server use any port number between 1025 & 65535 that is not already used, > ports below 1024 are generally reserve in linux/unix system & need su > rights.
> Regards
> On Friday, October 5, 2012 5:54:45 PM UTC+10, Archana wrote:
>> Hi, I need to create an application(using 2 emulators) in which: Each >> emulator serves as a server and a client.
>> Server starts as a service in background. On request by the client, I >> have to transfer the contents of a JSON file from 1 emulator's server to >> other emulator's client.. Can you please guide me in the usage of how to >> use port numbers(as the IP addresses of both instances of the emulator is >> the same)?
>> Thank you!
>> On Friday, October 5, 2012 5:48:19 AM UTC+3, gjs wrote:
On Mon, Oct 8, 2012 at 1:00 PM, gjs <garyjamessi...@gmail.com> wrote:
> Hi,
> A HTTP server is useful in Android for some apps, eg: wireless remote
> access to your files inside a LAN.
> Regards
> On Sunday, October 7, 2012 6:19:14 PM UTC+11, gjs wrote:
>> Hi,
>> No sure that will work if both emulators have the same IP address.
>> I'd try running server & client programs in the same emulator. For the
>> server use any port number between 1025 & 65535 that is not already used,
>> ports below 1024 are generally reserve in linux/unix system & need su
>> rights.
>> Regards
>> On Friday, October 5, 2012 5:54:45 PM UTC+10, Archana wrote:
>>> Hi, I need to create an application(using 2 emulators) in which: Each
>>> emulator serves as a server and a client.
>>> Server starts as a service in background. On request by the client, I
>>> have to transfer the contents of a JSON file from 1 emulator's server to
>>> other emulator's client.. Can you please guide me in the usage of how to
>>> use port numbers(as the IP addresses of both instances of the emulator is
>>> the same)?
>>> Thank you!
>>> On Friday, October 5, 2012 5:48:19 AM UTC+3, gjs wrote:
>>>>> 10-04 05:55:39.106: E/Tab(499): onReceivedError -6
>>>>> http://10.0.2.15:8697/ The connection to the server was unsuccessful.
>>>>> Can anyone please tell me what the error is about? Or is there any
>>>>> other way to implement a HTTP server in Android?
>>>>> Thanks in advance!
>>>>> --
> 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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> On Mon, Oct 8, 2012 at 1:00 PM, gjs <garyjam...@gmail.com <javascript:>>wrote:
>> Hi,
>> A HTTP server is useful in Android for some apps, eg: wireless remote >> access to your files inside a LAN.
>> Regards
>> On Sunday, October 7, 2012 6:19:14 PM UTC+11, gjs wrote:
>>> Hi,
>>> No sure that will work if both emulators have the same IP address.
>>> I'd try running server & client programs in the same emulator. For the >>> server use any port number between 1025 & 65535 that is not already used, >>> ports below 1024 are generally reserve in linux/unix system & need su >>> rights.
>>> Regards
>>> On Friday, October 5, 2012 5:54:45 PM UTC+10, Archana wrote:
>>>> Hi, I need to create an application(using 2 emulators) in which: Each >>>> emulator serves as a server and a client.
>>>> Server starts as a service in background. On request by the client, I >>>> have to transfer the contents of a JSON file from 1 emulator's server to >>>> other emulator's client.. Can you please guide me in the usage of how to >>>> use port numbers(as the IP addresses of both instances of the emulator is >>>> the same)?
>>>> Thank you!
>>>> On Friday, October 5, 2012 5:48:19 AM UTC+3, gjs wrote:
>>>>>> 10-04 05:55:39.106: E/Tab(499): onReceivedError -6 >>>>>> http://10.0.2.15:8697/ The connection to the server was unsuccessful.
>>>>>> Can anyone please tell me what the error is about? Or is there any >>>>>> other way to implement a HTTP server in Android?
>>>>>> Thanks in advance!
>>>>>> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-d...@googlegroups.com<javascript:> >> To unsubscribe from this group, send email to >> android-developers+unsubscribe@googlegroups.com <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en
I want to communicate between n Android phones. I want each to behave as clients and do some operation one after another updating a common file. For this, I need each phone to register its IP to a server(so that a service can be started). I was wondering if this can be tested using emulators(as their IP's are same). Or is C2DM the only choice?
HTTP are so wrong to do this so I don't know where to start. Use XMPP instead. It is designed for multiple clients talking to each other. No, it isn't a chat protocol. Jabber is just one application on top of XMPP. Take a look at pubsub how to do exactly what you want to do. And as a bonus you will get security fixed for you and multiple implementations. Don't use a hammer when you need a screwdriver.