// Path: app/src/main/java/wseemann/media/romote/model/ClientScanResult.java
// public class ClientScanResult {
//     private String IpAddr;
//     private String HWAddr;
//     private String Device;
//     private boolean isReachable;
// 
//     public ClientScanResult(String ipAddr, String hWAddr, String device, boolean isReachable) {
//         super();
//         this.IpAddr = ipAddr;
//         this.HWAddr = hWAddr;
//         this.Device = device;
//         this.isReachable = isReachable;
//     }
// 
//     public String getIpAddr() {
//         return IpAddr;
//     }
// 
//     public void setIpAddr(String ipAddr) {
//         IpAddr = ipAddr;
//     }
// 
//     public String getHWAddr() {
//         return HWAddr;
//     }
// 
//     public void setHWAddr(String hWAddr) {
//         HWAddr = hWAddr;
//     }
// 
//     public String getDevice() {
//         return Device;
//     }
// 
//     public void setDevice(String device) {
//         Device = device;
//     }
// 
//     public boolean isReachable() {
//         return isReachable;
//     }
// 
//     public void setReachable(boolean isReachable) {
//         this.isReachable = isReachable;
//     }
// }
// 
// Path: app/src/main/java/wseemann/media/romote/utils/Constants.java
// public enum WIFI_AP_STATE {
//     WIFI_AP_STATE_DISABLING,
//     WIFI_AP_STATE_DISABLED,
//     WIFI_AP_STATE_ENABLING,
//     WIFI_AP_STATE_ENABLED,
//     WIFI_AP_STATE_FAILED
// }


import android.util.Log;
import wseemann.media.romote.model.ClientScanResult;
import wseemann.media.romote.utils.Constants.WIFI_AP_STATE;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.util.ArrayList;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.provider.Settings;
    public boolean isWifiApEnabled() {
        return getWifiApState() == WIFI_AP_STATE.WIFI_AP_STATE_ENABLED;
    }

    /**
     * Gets the Wi-Fi AP Configuration.
     *
     * @return AP details in {@link WifiConfiguration}
     */
    public WifiConfiguration getWifiApConfiguration() {
        try {
            Method method = mWifiManager.getClass().getMethod("getWifiApConfiguration");
            return (WifiConfiguration) method.invoke(mWifiManager);
        } catch (Exception e) {
            Log.e(this.getClass().toString(), "", e);
            return null;
        }
    }

    /**
     * Sets the Wi-Fi AP Configuration.
     *
     * @return {@code true} if the operation succeeded, {@code false} otherwise
     */
    public boolean setWifiApConfiguration(WifiConfiguration wifiConfig) {
        try {
            Method method = mWifiManager.getClass().getMethod("setWifiApConfiguration", WifiConfiguration.class);
            return (Boolean) method.invoke(mWifiManager, wifiConfig);
        } catch (Exception e) {
            Log.e(this.getClass().toString(), "", e);
// Path: app/src/main/java/wseemann/media/romote/model/ClientScanResult.java
// public class ClientScanResult {
//     private String IpAddr;
//     private String HWAddr;
//     private String Device;
//     private boolean isReachable;
// 
//     public ClientScanResult(String ipAddr, String hWAddr, String device, boolean isReachable) {
//         super();
//         this.IpAddr = ipAddr;
//         this.HWAddr = hWAddr;
//         this.Device = device;
//         this.isReachable = isReachable;
//     }
// 
//     public String getIpAddr() {
//         return IpAddr;
//     }
// 
//     public void setIpAddr(String ipAddr) {
//         IpAddr = ipAddr;
//     }
// 
//     public String getHWAddr() {
//         return HWAddr;
//     }
// 
//     public void setHWAddr(String hWAddr) {
//         HWAddr = hWAddr;
//     }
// 
//     public String getDevice() {
//         return Device;
//     }
// 
//     public void setDevice(String device) {
//         Device = device;
//     }
// 
//     public boolean isReachable() {
//         return isReachable;
//     }
// 
//     public void setReachable(boolean isReachable) {
//         this.isReachable = isReachable;
//     }
// }
// 
// Path: app/src/main/java/wseemann/media/romote/utils/Constants.java
// public enum WIFI_AP_STATE {
//     WIFI_AP_STATE_DISABLING,
//     WIFI_AP_STATE_DISABLED,
//     WIFI_AP_STATE_ENABLING,
//     WIFI_AP_STATE_ENABLED,
//     WIFI_AP_STATE_FAILED
// }


// Path: app/src/main/java/wseemann/media/romote/utils/WifiApManager.java
import android.util.Log;
import wseemann.media.romote.model.ClientScanResult;
import wseemann.media.romote.utils.Constants.WIFI_AP_STATE;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.util.ArrayList;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.provider.Settings;

    public boolean isWifiApEnabled() {
        return getWifiApState() == WIFI_AP_STATE.WIFI_AP_STATE_ENABLED;
    }

    /**
     * Gets the Wi-Fi AP Configuration.
     *
     * @return AP details in {@link WifiConfiguration}
     */
    public WifiConfiguration getWifiApConfiguration() {
        try {
            Method method = mWifiManager.getClass().getMethod("getWifiApConfiguration");
            return (WifiConfiguration) method.invoke(mWifiManager);
        } catch (Exception e) {
            Log.e(this.getClass().toString(), "", e);
            return null;
        }
    }

    /**
     * Sets the Wi-Fi AP Configuration.
     *
     * @return {@code true} if the operation succeeded, {@code false} otherwise
     */
    public boolean setWifiApConfiguration(WifiConfiguration wifiConfig) {
        try {
            Method method = mWifiManager.getClass().getMethod("setWifiApConfiguration", WifiConfiguration.class);
            return (Boolean) method.invoke(mWifiManager, wifiConfig);
        } catch (Exception e) {
            Log.e(this.getClass().toString(), "", e);
            return false;