Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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"/>
Source by android.developreference.com #
 
PREVIOUS NEXT
Tagged: #mobile #network #ip #address #permission #android
ADD COMMENT
Topic
Name
6+4 =