diff --git a/app/src/main/java/io/appium/settings/Settings.java b/app/src/main/java/io/appium/settings/Settings.java index 47248fe9..03aad177 100644 --- a/app/src/main/java/io/appium/settings/Settings.java +++ b/app/src/main/java/io/appium/settings/Settings.java @@ -29,6 +29,7 @@ import io.appium.settings.receivers.DataConnectionSettingReceiver; import io.appium.settings.receivers.LocaleSettingReceiver; import io.appium.settings.receivers.LocationInfoReceiver; +import io.appium.settings.receivers.WiFiConnectionSettingReceiver; public class Settings extends Activity { private static final String TAG = "APPIUM SETTINGS"; @@ -43,6 +44,7 @@ public void onCreate(Bundle savedInstanceState) { registerAnimationSettingReceiver(); registerDataConnectionSettingReceiver(); registerLocationInfoReceiver(); + registerWiFiConnectionSettingReceiver(); // https://developer.android.com/about/versions/oreo/background-location-limits if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { @@ -62,6 +64,12 @@ public void run() { }, 1000); } + private void registerWiFiConnectionSettingReceiver() { + BroadcastReceiver wiFiConnectionSettingReceiver = new WiFiConnectionSettingReceiver(); + IntentFilter filter = new IntentFilter(WiFiConnectionSettingReceiver.ACTION); + getApplicationContext().registerReceiver(wiFiConnectionSettingReceiver, filter); + } + private void registerAnimationSettingReceiver() { BroadcastReceiver animationSettingReceiver = new AnimationSettingReceiver(); IntentFilter filter = new IntentFilter(AnimationSettingReceiver.ACTION);