Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
HTTP server in Android
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  14 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Archana  
View profile  
 More options Oct 4 2012, 1:57 am
From: Archana <ramalingam.arch...@gmail.com>
Date: Wed, 3 Oct 2012 22:57:58 -0700 (PDT)
Local: Thurs, Oct 4 2012 1:57 am
Subject: HTTP server in Android

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gjs  
View profile  
 More options Oct 4 2012, 10:48 pm
From: gjs <garyjamessi...@gmail.com>
Date: Thu, 4 Oct 2012 19:48:19 -0700 (PDT)
Local: Thurs, Oct 4 2012 10:48 pm
Subject: Re: HTTP server in Android

Hi,

Change the port number in your request -

PORT = 8765

not 8080

And yes you can write your own http server simply by using a server socket.
http://docs.oracle.com/javase/tutorial/networking/sockets/clientServe...

Regards


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Archana  
View profile  
 More options Oct 5 2012, 3:54 am
From: Archana <ramalingam.arch...@gmail.com>
Date: Fri, 5 Oct 2012 00:54:45 -0700 (PDT)
Local: Fri, Oct 5 2012 3:54 am
Subject: Re: HTTP server in Android

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!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gjs  
View profile  
 More options Oct 7 2012, 3:19 am
From: gjs <garyjamessi...@gmail.com>
Date: Sun, 7 Oct 2012 00:19:14 -0700 (PDT)
Local: Sun, Oct 7 2012 3:19 am
Subject: Re: HTTP server in Android

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Archana  
View profile  
 More options Oct 8 2012, 2:35 am
From: Archana <ramalingam.arch...@gmail.com>
Date: Sun, 7 Oct 2012 23:35:57 -0700 (PDT)
Local: Mon, Oct 8 2012 2:35 am
Subject: Re: HTTP server in Android

Hi,

Thanks for your reply.. Just a basic doubt. What will be the IP addresses
of 2 instances of the emulator? Is it same or different?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kristopher Micinski  
View profile  
 More options Oct 8 2012, 2:41 am
From: Kristopher Micinski <krismicin...@gmail.com>
Date: Mon, 8 Oct 2012 02:39:50 -0400
Local: Mon, Oct 8 2012 2:39 am
Subject: Re: [android-developers] HTTP server in Android
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Archana  
View profile  
 More options Oct 8 2012, 3:01 am
From: Archana <ramalingam.arch...@gmail.com>
Date: Mon, 8 Oct 2012 00:01:57 -0700 (PDT)
Local: Mon, Oct 8 2012 3:01 am
Subject: Re: [android-developers] HTTP server in Android

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!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kristopher Micinski  
View profile  
 More options Oct 8 2012, 3:06 am
From: Kristopher Micinski <krismicin...@gmail.com>
Date: Mon, 8 Oct 2012 03:04:27 -0400
Local: Mon, Oct 8 2012 3:04 am
Subject: Re: [android-developers] HTTP server in Android
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

kris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gjs  
View profile  
 More options Oct 8 2012, 3:30 am
From: gjs <garyjamessi...@gmail.com>
Date: Mon, 8 Oct 2012 00:30:07 -0700 (PDT)
Local: Mon, Oct 8 2012 3:30 am
Subject: Re: HTTP server in Android

Hi,

A HTTP server is useful in Android for some apps, eg: wireless remote
access to your files inside a LAN.

Regards


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Amey Bapat  
View profile  
 More options Oct 8 2012, 5:12 am
From: Amey Bapat <amey.n.ba...@gmail.com>
Date: Mon, 8 Oct 2012 14:39:42 +0530
Local: Mon, Oct 8 2012 5:09 am
Subject: Re: [android-developers] Re: HTTP server in Android

for GCM refer this blog
http://www.vogella.com/articles/AndroidCloudToDeviceMessaging/article...

--
live and let LIVE!!!

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Archana  
View profile  
 More options Oct 11 2012, 2:31 am
From: Archana <ramalingam.arch...@gmail.com>
Date: Wed, 10 Oct 2012 23:31:45 -0700 (PDT)
Local: Thurs, Oct 11 2012 2:31 am
Subject: Re: [android-developers] Re: HTTP server in Android

Are the IP addresses of 2 Android emulators unique? Or how do I get the IP
address of the emulator?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lew  
View profile  
 More options Oct 11 2012, 3:14 am
From: Lew <lewbl...@gmail.com>
Date: Thu, 11 Oct 2012 00:14:11 -0700 (PDT)
Local: Thurs, Oct 11 2012 3:14 am
Subject: Re: [android-developers] Re: HTTP server in Android

Archana wrote:
> Are the IP addresses of 2 Android emulators unique? Or how do I get the IP
> address of the emulator?

>> Spend five minutes with your favorite search engine. That's how I found

http://developer.android.com/tools/devices/emulator.html#networkaddre...

It really took less than five minutes.

How long did you wait for this answer to appear here?

Anyway I normally go to the emulator document at developer.android.com for
such questions.

RTFM.
GIYF.

--
Lew


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Archana  
View profile  
 More options Oct 11 2012, 3:29 am
From: Archana <ramalingam.arch...@gmail.com>
Date: Thu, 11 Oct 2012 00:29:31 -0700 (PDT)
Local: Thurs, Oct 11 2012 3:29 am
Subject: Re: [android-developers] Re: HTTP server in Android

Hi,

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?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jxn  
View profile  
 More options Oct 11 2012, 7:21 am
From: Jxn <anders.jack...@gmail.com>
Date: Thu, 11 Oct 2012 04:21:46 -0700 (PDT)
Local: Thurs, Oct 11 2012 7:21 am
Subject: Re: [android-developers] Re: HTTP server in Android

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »