diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index c038225..17835c5 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -19,5 +19,6 @@
+
\ No newline at end of file
diff --git a/app/src/main/java/com/peakmain/asmactualcombat/utils/Utils.java b/app/src/main/java/com/peakmain/asmactualcombat/utils/Utils.java
index 55d4d07..d58392c 100644
--- a/app/src/main/java/com/peakmain/asmactualcombat/utils/Utils.java
+++ b/app/src/main/java/com/peakmain/asmactualcombat/utils/Utils.java
@@ -11,6 +11,7 @@
import android.text.TextUtils;
import android.util.Log;
+import com.peakmain.sdk.constants.SensorsDataConstants;
import com.peakmain.ui.utils.LogUtils;
import java.util.List;
@@ -111,7 +112,7 @@ public final boolean a(ConnectivityManager var1) {
boolean var3 = false;
try {
- if (var2.getConnectionInfo()!=null) {
+ if (var2.getConnectionInfo() != null) {
var3 = true;
}
} catch (Throwable var4) {
@@ -121,16 +122,48 @@ public final boolean a(ConnectivityManager var1) {
}
}
+ public static int getIpAddress(Context context) {
+ WifiManager wifi = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
+ WifiInfo info = null;
+ try {
+ info = wifi.getConnectionInfo();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return info.getIpAddress();
+ }
+
+ public static String getBSSID(Context context) {
+ WifiManager wifi = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
+ WifiInfo info = null;
+ try {
+ info = wifi.getConnectionInfo();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return info.getBSSID();
+ }
+ public static String getSSID(Context context) {
+ WifiManager wifi = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
+ WifiInfo info = null;
+ try {
+ info = wifi.getConnectionInfo();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return info.getSSID();
+ }
public List getScanResults() {
- if(this.mWifiManager!=null){
- List var1 = this.mWifiManager.getScanResults();
- for (ScanResult scanResult : var1) {
- LogUtils.e(scanResult.BSSID);
- }
- return var1;
- }
+ if (this.mWifiManager != null) {
+ List var1 = this.mWifiManager.getScanResults();
+ for (ScanResult scanResult : var1) {
+ LogUtils.e(scanResult.BSSID);
+ }
+ return var1;
+ }
return null;
}
+
public static String getAndroidId(Context context) {
return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
}