@GWAK ===
can you put the code you are using?
can you put the console error message (if it exists)?
what do you mean by Android version? - Is it compiling with or running on a device with 8 or 9?
how is your Manifest?
Please take a look at the picture of the hardware.
The Wi-Fi module constitutes the network and the smart phone is connected.
(picture)The current IP address is the IP address given on the actual network.
(source code result : )
Smartphone Android version 6.0 ~ 8.0: 192.168.4.2
Smartphone Android version 9.0: 192.0.0.5
The cause of the phenomenon seems to be the phenomenon after updating the Android version.
I would like to know IP address(smartphone) at the moment. Is there a way?
How are you setting up to use ver 9? Is that through your manifest?
I confirm it works in ver 8 (Api 26 (?) ) and I enabled internet and access_network_state. I might only need one of them as i did not check the docs.
There must be a reason for that comparison there that you are commenting out. With your suggested change, I would recommend the next additional change so from:
i never saw the Manifest
i suppose that @GWAK is using 2 or 3 phones (6,8,9)
i dont know what is the compiling version
i would like to read some complete code snippet
i have had a look at the src code from Ketai (from which is extracted the code posted) and String “thing” is set to “0.0.0.0” in a for loop (at each loop) so i cannot see why commenting it can change something…And it “returns” the ip, as suggested by @kfrajer
@GWAK ===
i told you that i have had a look to this code (from the ketai lib src) ; but you dont answer to the others questions and the real explanation is probably here (the Manifest, the version used for compiling and so on…+ the real code you are using ) -