Add CCCamp23
This commit is contained in:
parent
052983b67d
commit
b34c9e9674
5 changed files with 27 additions and 27 deletions
|
@ -1,6 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="nl.eventinfra.wifisetup" android:installLocation="auto" android:versionCode="20220531" android:versionName="0.35">
|
package="nl.eventinfra.wifisetup"
|
||||||
|
android:installLocation="auto"
|
||||||
|
android:versionCode="20230804"
|
||||||
|
android:versionName="0.36">
|
||||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||||
<uses-feature android:name="android.hardware.wifi" android:required="true"/>
|
<uses-feature android:name="android.hardware.wifi" android:required="true"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
|
|
|
@ -15,13 +15,11 @@
|
||||||
|
|
||||||
package nl.eventinfra.wifisetup;
|
package nl.eventinfra.wifisetup;
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.AlertDialog.Builder;
|
import android.app.AlertDialog.Builder;
|
||||||
import android.content.pm.PackageInfo;
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
|
||||||
import android.net.wifi.WifiConfiguration;
|
import android.net.wifi.WifiConfiguration;
|
||||||
import android.net.wifi.WifiEnterpriseConfig;
|
import android.net.wifi.WifiEnterpriseConfig;
|
||||||
import android.net.wifi.WifiEnterpriseConfig.Eap;
|
import android.net.wifi.WifiEnterpriseConfig.Eap;
|
||||||
|
@ -39,7 +37,6 @@ import android.widget.AdapterView;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
@ -48,7 +45,6 @@ import android.widget.ViewFlipper;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.security.cert.CertificateFactory;
|
import java.security.cert.CertificateFactory;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -60,7 +56,8 @@ enum Profile {
|
||||||
PROFILE_SITEONLY,
|
PROFILE_SITEONLY,
|
||||||
PROFILE_PROTECTME,
|
PROFILE_PROTECTME,
|
||||||
PROFILE_SPECIAL
|
PROFILE_SPECIAL
|
||||||
};
|
}
|
||||||
|
|
||||||
public class WifiSetup extends Activity {
|
public class WifiSetup extends Activity {
|
||||||
protected static final int SHOW_PREFERENCES = 0;
|
protected static final int SHOW_PREFERENCES = 0;
|
||||||
// FIXME This should be a configuration setting somehow
|
// FIXME This should be a configuration setting somehow
|
||||||
|
@ -138,9 +135,9 @@ public class WifiSetup extends Activity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.logon);
|
setContentView(R.layout.logon);
|
||||||
|
|
||||||
flipper = (ViewFlipper) findViewById(R.id.viewflipper);
|
flipper = findViewById(R.id.viewflipper);
|
||||||
username = (EditText) findViewById(R.id.username);
|
username = findViewById(R.id.username);
|
||||||
password = (EditText) findViewById(R.id.password);
|
password = findViewById(R.id.password);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
check5g = (CheckBox) findViewById(R.id.check5g);
|
check5g = (CheckBox) findViewById(R.id.check5g);
|
||||||
|
@ -156,12 +153,12 @@ public class WifiSetup extends Activity {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Spinner spinner = (Spinner) findViewById(R.id.profile);
|
Spinner spinner = findViewById(R.id.profile);
|
||||||
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View v, int position,
|
public void onItemSelected(AdapterView<?> parent, View v, int position,
|
||||||
long id) {
|
long id) {
|
||||||
View logindata = findViewById(R.id.logindata);;
|
View logindata = findViewById(R.id.logindata);
|
||||||
logindata.setVisibility(View.INVISIBLE);
|
logindata.setVisibility(View.INVISIBLE);
|
||||||
switch((int) id) {
|
switch((int) id) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -193,7 +190,7 @@ public class WifiSetup extends Activity {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
btn = (Button) findViewById(R.id.button1);
|
btn = findViewById(R.id.button1);
|
||||||
if (btn == null)
|
if (btn == null)
|
||||||
throw new RuntimeException("button1 not found. Odd");
|
throw new RuntimeException("button1 not found. Odd");
|
||||||
btn.setOnClickListener(new Button.OnClickListener() {
|
btn.setOnClickListener(new Button.OnClickListener() {
|
||||||
|
@ -249,7 +246,7 @@ public class WifiSetup extends Activity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveWifiConfig() {
|
private void saveWifiConfig() {
|
||||||
|
/*
|
||||||
ssid = "emfcamp";
|
ssid = "emfcamp";
|
||||||
|
|
||||||
subject_match = "/CN=radius.emf.camp";
|
subject_match = "/CN=radius.emf.camp";
|
||||||
|
@ -282,17 +279,17 @@ public class WifiSetup extends Activity {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
StoreWifiProfile(ssid, subject_match, altsubject_match, s_username, s_password);
|
StoreWifiProfile(ssid, subject_match, altsubject_match, s_username, s_password);
|
||||||
|
*/
|
||||||
// MCH2022
|
// CCC Camp2023
|
||||||
|
|
||||||
/*if (check5g.isChecked()) {
|
/*if (check5g.isChecked()) {
|
||||||
ssid = "MCH2022";
|
ssid = "MCH2022";
|
||||||
} else {
|
} else {
|
||||||
ssid = "MCH2022-legacy";
|
ssid = "MCH2022-legacy";
|
||||||
}*/
|
}*/
|
||||||
ssid = "MCH2022";
|
ssid = "Camp2023";
|
||||||
subject_match = "/CN=radius.eventinfra.org";
|
subject_match = "/CN=radius.c3noc.net";
|
||||||
altsubject_match = "DNS:radius.eventinfra.org";
|
altsubject_match = "DNS:radius.c3noc.net";
|
||||||
|
|
||||||
realm = "";
|
realm = "";
|
||||||
switch (selected_profile) {
|
switch (selected_profile) {
|
||||||
|
@ -301,8 +298,8 @@ public class WifiSetup extends Activity {
|
||||||
s_password = "allowany";
|
s_password = "allowany";
|
||||||
break;
|
break;
|
||||||
case PROFILE_SITEONLY:
|
case PROFILE_SITEONLY:
|
||||||
s_username = "mch2022";
|
s_username = "camp";
|
||||||
s_password = "mch2022";
|
s_password = "camp";
|
||||||
break;
|
break;
|
||||||
case PROFILE_PROTECTME:
|
case PROFILE_PROTECTME:
|
||||||
s_username = "outboundonly";
|
s_username = "outboundonly";
|
||||||
|
@ -484,8 +481,8 @@ public class WifiSetup extends Activity {
|
||||||
mHandler.post(new Runnable() {
|
mHandler.post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
TextView res_title = (TextView) findViewById(R.id.resulttitle);
|
TextView res_title = findViewById(R.id.resulttitle);
|
||||||
TextView res_text = (TextView) findViewById(R.id.result);
|
TextView res_text = findViewById(R.id.result);
|
||||||
|
|
||||||
System.out.println(text);
|
System.out.println(text);
|
||||||
res_text.setText(text);
|
res_text.setText(text);
|
||||||
|
|
BIN
app/src/main/res/drawable-hdpi/camp23logo.png
Normal file
BIN
app/src/main/res/drawable-hdpi/camp23logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -24,10 +24,10 @@
|
||||||
android:id="@+id/logo"
|
android:id="@+id/logo"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="200dp"
|
android:layout_height="200dp"
|
||||||
android:contentDescription="EMF logo"
|
android:contentDescription="CCCamp23 logo"
|
||||||
android:padding="0dp"
|
android:padding="0dp"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/emfmch2022" />
|
android:src="@drawable/camp23logo" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">EMF/MCH 2022 Wifi Setup</string>
|
<string name="app_name">CCCamp 2023 Wifi Setup</string>
|
||||||
|
|
||||||
<string name="TITLE_LOGON">Please logon</string>
|
<string name="TITLE_LOGON">Please logon</string>
|
||||||
<string name="Username">username@realm</string>
|
<string name="Username">username@realm</string>
|
||||||
<string name="Password">password</string>
|
<string name="Password">password</string>
|
||||||
<string name="Logon">Create connection entry</string>
|
<string name="Logon">Create connection entry</string>
|
||||||
|
|
||||||
<string name="twitter">https://twitter.com/emfnoc\nhttps://twitter.com/mch2022noc</string>
|
<string name="twitter">https://twitter.com/c3noc</string>
|
||||||
|
|
||||||
<string name="c5ghz">This device supports the 5GHz band</string>
|
<string name="c5ghz">This device supports the 5GHz band</string>
|
||||||
<string name="l5ghz">(Unfortunately, autodetecting 5GHz support is broken…)</string>
|
<string name="l5ghz">(Unfortunately, autodetecting 5GHz support is broken…)</string>
|
||||||
|
@ -19,5 +19,5 @@
|
||||||
<string name="EXIT_TITLE">Exit</string>
|
<string name="EXIT_TITLE">Exit</string>
|
||||||
|
|
||||||
<string name="ABOUT_CONTENT">This small helper app creates a Wifi connection entry for the CCC/EMF/MCH2022 networks. It configures the correct SSL CA and subject name match, making it a little more secure than a hand-created entry.</string>
|
<string name="ABOUT_CONTENT">This small helper app creates a Wifi connection entry for the CCC/EMF/MCH2022 networks. It configures the correct SSL CA and subject name match, making it a little more secure than a hand-created entry.</string>
|
||||||
<string name="LOGO">EMF / MCH 2022 Logos</string>
|
<string name="LOGO">Chaos Communication Camp Logo</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue