Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am doing a android project. I want to connect my client(android phone) using ip address to my laptop(server). I am using ip address of wireless modem(MTS). Each time i reconnect the ip address changes. So how can I keep this ip address constant so that only one ip address can be used for connection via wireless internet connection?

share|improve this question

migrated from May 13 '12 at 5:47

This question came from our site for professional and enthusiast programmers.

The ip-address of your modem is given by your provider and will most likely change everytime you reconnect.

So my answer would be you can´t. This makes the question far off topic, you might wanna take it off.

share|improve this answer

If client IP is fix then here's an approach

1)Write a code listening to port in android client 2)In the server, write a client to connect to android port send the server IP to the android

Then you can continue with your normal approach


You can use UPNP for your case where upnp server broadcast its info to all the clients in the network.But implementation will be a bit extensive in this case.

share|improve this answer

You must log in to answer this question.