diff --git a/app/src/main/java/me/datenknoten/tueroeffner/MainActivity.java b/app/src/main/java/me/datenknoten/tueroeffner/MainActivity.java index 8d81875..2f39474 100644 --- a/app/src/main/java/me/datenknoten/tueroeffner/MainActivity.java +++ b/app/src/main/java/me/datenknoten/tueroeffner/MainActivity.java @@ -160,7 +160,11 @@ public class MainActivity extends ActionBarActivity { WifiConfiguration wifiConfig = new WifiConfiguration(); - wifiConfig.SSID = String.format("\"%s\"", networkSSID); + if (Build.VERSION.SDK_INT > 17) { + wifiConfig.SSID = String.format("\"%s\"", networkSSID); + } else { + wifiConfig.SSID = networkSSID; + } int netId = wifiManager.addNetwork(wifiConfig); wifiManager.disconnect();