0

I am building an Android application to go with my company's server. The server is for the enterprise and resides in the customer internal network. Each customer has obviously a different IP address assigned to the server. This is an off the shelf product, meaning we don't build it per customer. The client need the server IP in order to connect and start working.

Currently the client ask the user for the server IP, but the users usually don't know it.

I am looking for an easy way to be able to configure the client with a different server IP address per costumer.

We are deploying the client from the costumer internal web server (no market). Is there a way for the client to know where was it downloaded from? than i can use this IP? Is there a way for the client to know the apk name that was used to start the installation process? than i can rename the apk name to include the server IP.

Any other suggestions?

Andrew Aylett
  • 39,182
  • 5
  • 68
  • 95
p0pe1e
  • 11
  • 3

1 Answers1

0

From your question, it seems that the customers will always be using the app on their local network. Off the top of my head, you could:

  • Use mDNS to find your server.
  • Require your customer to add a DNS entry, so that yourappname.customer.com resolves to the right address. With domain-lookup from DHCP, you should be able to resolve yourappname and have the right domain appended.
  • Require your customer to add a field to their DHCP response (probably more work than the customer would want).
  • Hit your website, have it look at the IP address it came from and work out which customer it was -- this requires you to know your customers' servers' IP addresses.
Andrew Aylett
  • 39,182
  • 5
  • 68
  • 95