1

Can someone let me know when will the WiFi IP address change in an android device?

If I acquire a WiFi Lock, will the IP address remains the same till I disconnect?

NagarjunaReddy
  • 8,621
  • 10
  • 63
  • 98
user1741274
  • 759
  • 3
  • 13
  • 25

1 Answers1

0

Your IP address changes according to AP Subnet like any hardware with network adapter.

WifiLock allows an application to keep the Wi-Fi awake (if device stay in stay-by ...) and not refers to IP change

Maxim Shoustin
  • 77,483
  • 27
  • 203
  • 225
  • Your IP address changes according to AP Subnet. Can you please explain? If Wi-Fi is awake, will the IP address be the same as the one initially assigned? @Fess – user1741274 Nov 12 '12 at 13:44
  • lets say you have Access Point (AP) with `Gateway 192.168.2.1`. Since your device connected to AP you have `IP 192.168.2.2` If device entered to sleep and your WiFi manager disconnected, after wake up you can fetch the same IP in case if no other devices took it. `WiFiLock` just makes your device to be connected to AP during sleep state – Maxim Shoustin Nov 12 '12 at 13:48
  • I am relatively new to Android. If I implement a wifi lock and wake lock, the IP address will not change. Am I correct? @Fess – user1741274 Nov 12 '12 at 14:13