Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

mobile network ip address permission android

I used this and it workd !
WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE);
String ip = Formatter.formatIpAddress(wm.getConnectionInfo().getIpAddress());
Below permissions in the manifest file.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
Comment

PREVIOUS NEXT
Code Example
Java :: long to double in java 
Java :: ClassNotFoundException: org.springframework.ui.freemarker.FreeMarkerConfigurationFactory 
Java :: how to pass a float between activities in android studio 
Java :: how to set path for java in windows 10 
Java :: java mostrar resultados ventana grafica 
Java :: could not find java in a java_home at /opt/java/openjdk/bin/java docker sonarqube 
Java :: keep jframe on top 
Java :: quebra de linha java 
Java :: pdf intent does not have permission to launch 
Java :: how to run a java file in terminal 
Java :: double to string in java without tovalue 
Java :: square star pattern in java 
Java :: set gamemode of player spigot 
Java :: what are variables in java 
Java :: reader from string java 
Java :: java make object 
Java :: java array object 
Java :: put arraylist in hashtable java 
Java :: Java Hashmap Replace Elements 
Java :: csv compare java 
Java :: java clear scanner 
Java :: my maven project give error when adding javax.xml.bind dependency 
Java :: create thread java 
Java :: scaletype android dynamic 
Java :: djava days between two dates 
Java :: java interview questions 
Java :: flutter doctor Unable to find bundled Java version. 
Java :: precision java 
Java :: get image file path 
Java :: how to add random numbers to an array 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =