Skip to content

pahlevikun/Wifiku

Repository files navigation

Wifiku

A simple Android network-info libs. It's very difficult when you don't know how to get information from access-point or testing your connection. So this is a simple libs for making your jobs more efficient.

Sebuah library Android sederhana untuk informasi jaringan. Sangat sulit ketika kamu tidak tahu bagaimana caranya mendapatkan informasi dari access-point atau ketika mencoba koneksi internet. Inilah sebuah library sederhana untuk membuat pekerjaanmu lebih efisien.

Support

Support from Android 4.0 Ice Cream Sandwich / Minimum API 14
Dukungan mulai Android versi 4.0 Ice Cream Sandwich / Minimal API 14

Permission

Don't forget to add network permission in AndroidManifest
Jangan lupa untuk menambahkan permission di AndroidManifest

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

Installing

Add repository in build.gradle
Tambahkan repository di build.gradle

repositories {
    maven { url "https://jitpack.io" }
}

And add dependencies
Dan tambahkan dependencies

dependencies {
    implementation 'com.github.pahlevikun:wifiku:0.0.1'
}

Sample Code

Getting SSID
Mendapatkan SSID

String SSID = WifiKu.getWifiSSID(this);

Getting BSSID
Mendapatkan BSSID

String BSSID = WifiKu.getWifiBSSID(this);

Getting Original RSSI
Mendapatkan RSSI asli

int RSSI = WifiKu.getWifiRSSIPlain(this);

Getting RSSI Strength
Mendapatkan kekuatan RSSI

int RSSI = WifiKu.getWifiRSSIStrength(this,4);

Getting Original IP ADDRESS
Mendapatkan IP ADDRESS Asli

int IPADDRESS = WifiKu.getWifiIPAdressPlain(this);

Getting Formatted IP ADDRESS
Mendapatkan IP ADDRESS Terformat

String IPADDRESS = WifiKu.getWifiIPAdressFormatted(this);

Getting MAC ADDRESS
Mendapatkan MAC ADDRESS

String MACADDRESS = WifiKu.getWifiMacAddress(this);