+ case R.id.select_freq:
+ // Set the TBT radio frequency
+
+ final String[] frequencies = {
+ "Channel 0 (434.550MHz)",
+ "Channel 1 (434.650MHz)",
+ "Channel 2 (434.750MHz)",
+ "Channel 3 (434.850MHz)",
+ "Channel 4 (434.950MHz)",
+ "Channel 5 (435.050MHz)",
+ "Channel 6 (435.150MHz)",
+ "Channel 7 (435.250MHz)",
+ "Channel 8 (435.350MHz)",
+ "Channel 9 (435.450MHz)"
+ };
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ builder.setTitle("Pick a frequency");
+ builder.setItems(frequencies,
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int item) {
+ setFrequency(frequencies[item]);
+ }
+ });
+ AlertDialog alert = builder.create();
+ alert.show();
+ return true;