I'm trying to programmatically detect if the IP that is used, in this case by a payment terminal based on Android 12, is obtained by DHCP or declared STATIC.
The requirement is to show a string (DHCP or STATIC) in a menu.
There are two different versions of the terminal, one that has Wifi support and one that has ethernet support.
I have tried below solutions without success.
Determine if IP Address is STATIC or DHCP using Android?
How to check if wifi connected is static or not programatically in android