<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <PreferenceCategory
        app:key="app_category"
        app:title="@string/app_category_title">

        <ListPreference
            app:key="app_audio_source"
            app:title="@string/app_audio_source_title"
            app:entries="@array/ports_sound_modem_audio_source_entries"
            app:entryValues="@array/ports_sound_modem_audio_source_values"
            app:defaultValue="0"
            app:summary="%s">
        </ListPreference>

        <ListPreference
            app:key="app_audio_destination"
            app:title="@string/app_audio_destination_title"
            app:entries="@array/ports_sound_modem_audio_destination_entries"
            app:entryValues="@array/ports_sound_modem_audio_destination_values"
            app:defaultValue="1"
            app:summary="%s">
        </ListPreference>

        <SwitchPreference
            app:key="app_notifications_voice"
            app:title="@string/app_notifications_voice_enable_title"
            app:summary="@string/app_notifications_voice_enable_summary"
            app:defaultValue="false">
        </SwitchPreference>

        <SwitchPreference
            app:key="app_volume_ptt"
            app:title="@string/app_volume_ptt_title"
            app:summary="@string/app_volume_ptt_summary"
            app:defaultValue="false">
        </SwitchPreference>

        <SwitchPreference
            app:key="app_no_lock"
            app:title="@string/app_no_lock_title"
            app:summary="@string/app_no_lock_summary"
            app:defaultValue="false">
        </SwitchPreference>

        <SwitchPreference
            app:key="app_turn_screen_on"
            app:title="@string/app_turn_screen_on_title"
            app:summary="@string/app_turn_screen_on_summary"
            app:dependency="app_no_lock"
            app:defaultValue="false">
        </SwitchPreference>

        <SwitchPreference
            app:key="app_keep_screen_on"
            app:title="@string/app_keep_screen_on_title"
            app:summary="@string/app_keep_screen_on_summary"
            app:defaultValue="false">
        </SwitchPreference>

        <SwitchPreference
            app:key="app_no_cpu_sleep"
            app:title="@string/app_no_cpu_sleep_title"
            app:summary="@string/app_no_cpu_sleep_summary"
            app:defaultValue="false">
        </SwitchPreference>

    </PreferenceCategory>

    <PreferenceCategory
        app:key="ports_category"
        app:title="@string/ports_category_title">

        <ListPreference
            app:key="ports_type"
            app:title="@string/ports_type_title"
            app:entries="@array/ports_type_labels"
            app:entryValues="@array/ports_type_values"
            app:summary="%s"
            app:defaultValue="loopback">
        </ListPreference>

        <Preference
            app:key="ports_bt_client_name"
            app:title="@string/usb_bt_client_name_title"
            app:summary="@string/usb_bt_client_name_summary">
            <intent
                android:targetPackage="com.radio.codec2talkie"
                android:targetClass="com.radio.codec2talkie.settings.BluetoothSettingsActivity">
            </intent>
        </Preference>

        <Preference
            app:key="ports_usb_serial"
            app:title="@string/usb_serial_title"
            app:summary="@string/usb_serial_summary"
            app:fragment="com.radio.codec2talkie.settings.SettingsActivity$SettingsUsbFragment">
        </Preference>

        <Preference
            android:key="pref_tcp_ip_control"
            android:title="@string/port_tcp_ip_prefs_title"
            android:summary="@string/port_tcp_ip_prefs_summary"
            app:fragment="com.radio.codec2talkie.settings.SettingsActivity$SettingsTcpIpFragment">
        </Preference>

        <Preference
            app:key="ports_sound_modem_control"
            app:title="@string/ports_sound_modem_control_title"
            app:summary="@string/ports_sound_modem_control_settings"
            app:fragment="com.radio.codec2talkie.settings.SettingsActivity$SettingsSoundModemFragment">
        </Preference>

    </PreferenceCategory>

    <PreferenceCategory
        app:key="codec2_category"
        app:title="@string/codec2_category_title">

        <ListPreference
            app:key="codec2_mode"
            app:title="@string/codec2_mode_title"
            app:entries="@array/codec2_modes"
            app:entryValues="@array/codec2_modes"
            app:defaultValue="MODE_450=10"
            app:summary="%s">
        </ListPreference>

        <EditTextPreference
            app:key="codec2_tx_frame_max_size"
            app:title="@string/codec2_tx_frame_max_size_title"
            app:summary="@string/codec2_tx_frame_max_size_summary"
            app:defaultValue="48">
        </EditTextPreference>

        <SwitchPreference
            app:key="codec2_recording_enabled"
            app:title="@string/codec2_recorder_title"
            app:summary="@string/codec2_recorder_summary"
            app:defaultValue="false">
        </SwitchPreference>
    </PreferenceCategory>

    <PreferenceCategory
        app:key="kiss_category"
        app:title="@string/kiss_category_title">

        <SwitchPreference
            app:key="kiss_enable"
            app:title="@string/kiss_enable_title"
            app:summary="@string/kiss_enable_summary"
            app:defaultValue="true">
        </SwitchPreference>

        <Preference
            android:key="pref_kiss_basic"
            android:title="@string/kiss_basic_title"
            android:summary="@string/kiss_basic_summary"
            app:fragment="com.radio.codec2talkie.settings.SettingsActivity$SettingsKissBasicFragment"
            app:dependency="kiss_enable">
        </Preference>

        <SwitchPreference
            app:key="kiss_buffered_enable"
            app:title="@string/kiss_buffered_enable_title"
            app:summary="@string/kiss_buffered_enable_summary"
            app:dependency="kiss_enable"
            app:defaultValue="false">
        </SwitchPreference>

        <SwitchPreference
            app:key="kiss_parrot_enable"
            app:title="@string/kiss_parrot_enable_title"
            app:summary="@string/kiss_parrot_enable_summary"
            app:dependency="kiss_enable"
            app:defaultValue="false">
        </SwitchPreference>

        <SwitchPreference
            app:key="kiss_extensions_enable"
            app:title="@string/kiss_extensions_enable_title"
            app:summary="@string/kiss_extensions_enable_summary"
            app:dependency="kiss_enable"
            app:defaultValue="false">
        </SwitchPreference>

        <Preference
            android:key="pref_radio_control"
            android:title="@string/kiss_extensions_radio_control_title"
            android:summary="@string/kiss_extensions_radio_control_summary"
            app:fragment="com.radio.codec2talkie.settings.SettingsActivity$SettingsRadioFragment"
            app:dependency="kiss_extensions_enable">
        </Preference>

    </PreferenceCategory>

    <PreferenceCategory
        app:key="aprs_category"
        app:title="@string/aprs_category_title">

        <SwitchPreference
            app:key="aprs_enable"
            app:title="@string/aprs_enable_title"
            app:summary="@string/aprs_enable_summary"
            app:dependency="kiss_enable"
            app:defaultValue="true">
        </SwitchPreference>

        <SwitchPreference
            app:key="aprs_voax25_enable"
            app:title="@string/aprs_voax25_enable_title"
            app:summary="@string/aprs_voax25_enable_summary"
            app:dependency="aprs_enable"
            app:defaultValue="true">
        </SwitchPreference>

        <EditTextPreference
            app:key="aprs_callsign"
            app:title="@string/aprs_callsign_title"
            app:summary="@string/aprs_callsign_summary"
            app:dependency="aprs_enable"
            app:defaultValue="NOCALL">
        </EditTextPreference>

        <ListPreference
            app:key="aprs_ssid"
            app:title="@string/aprs_ssid_title"
            app:entries="@array/aprs_ssid_labels"
            app:entryValues="@array/aprs_ssid_values"
            app:dependency="aprs_enable"
            app:summary="%s"
            app:defaultValue="7">
        </ListPreference>

        <EditTextPreference
            app:key="aprs_digipath"
            app:title="@string/aprs_digipath_title"
            app:summary="@string/aprs_digipath_summary"
            app:dependency="aprs_enable"
            app:defaultValue="WIDE1-1">
        </EditTextPreference>

        <Preference
            app:key="aprs_symbol"
            app:title="@string/aprs_symbol_title"
            app:summary="@string/aprs_symbol_summary"
            app:dependency="aprs_enable"
            app:defaultValue="/$">
            <intent
                android:targetPackage="com.radio.codec2talkie"
                android:targetClass="com.radio.codec2talkie.settings.AprsSymbolSelectionActivity">
            </intent>
        </Preference>

        <EditTextPreference
            app:key="aprs_comment"
            app:title="@string/aprs_comment_title"
            app:summary="@string/aprs_comment_summary"
            app:dependency="aprs_enable"
            app:defaultValue="">
        </EditTextPreference>

        <Preference
            android:key="aprs_location_settings"
            android:title="@string/aprs_location_settings_title"
            android:summary="@string/aprs_location_settings_summary"
            app:fragment="com.radio.codec2talkie.settings.SettingsActivity$SettingsAprsLocationFragment"
            app:dependency="aprs_enable">
        </Preference>

        <Preference
            android:key="aprs_position_privacy_settings"
            android:title="@string/aprs_position_privacy_settings_title"
            android:summary="@string/aprs_position_privacy_settings_summary"
            app:fragment="com.radio.codec2talkie.settings.SettingsActivity$SettingsPositionPrivacyFragment"
            app:dependency="aprs_enable">
        </Preference>

        <SwitchPreference
            app:key="aprs_digirepeater_enable"
            app:title="@string/aprs_digirepeater_enable_title"
            app:summary="@string/aprs_digirepeater_enable_summary"
            app:dependency="aprs_enable"
            app:defaultValue="false">
        </SwitchPreference>

        <SwitchPreference
            app:key="aprs_is_enable"
            app:title="@string/aprs_is_enable_title"
            app:summary="@string/aprs_is_enable_summary"
            app:dependency="aprs_enable"
            app:defaultValue="false">
        </SwitchPreference>

        <Preference
            android:key="aprs_is_settings"
            android:title="@string/aprs_is_settings_title"
            android:summary="@string/aprs_is_settings_summary"
            app:fragment="com.radio.codec2talkie.settings.SettingsActivity$SettingsAprsIsFragment"
            app:dependency="aprs_is_enable">
        </Preference>
    </PreferenceCategory>

</PreferenceScreen>