<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="org.aprsdroid.app"
      android:versionCode="19"
      android:versionName="1.5.0"
      android:installLocation="auto">

    <uses-feature android:name="android.hardware.bluetooth" android:required="false" />
    <uses-feature android:name="android.hardware.location" android:required="false" />
    <uses-feature android:name="android.hardware.location.gps" android:required="false" />
    <uses-feature android:name="android.hardware.microphone" android:required="false" />
    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
    <uses-feature android:name="android.hardware.usb.host" android:required="false" />

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application android:label="@string/app_name" android:icon="@drawable/icon"
	    android:usesCleartextTraffic="true"
	    android:theme="@style/DefaultTheme" >

	<meta-data
		android:name="com.google.android.geo.API_KEY"
		android:value="@string/google_maps_key" />
	<uses-library android:name="org.apache.http.legacy" android:required="false"/>
        <activity android:name=".APRSdroid"
		android:configChanges="orientation|keyboardHidden|screenSize"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
            </intent-filter>
            <meta-data
                android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
                android:resource="@xml/device_filter" />
        </activity>
	<activity android:name=".LogActivity" android:label="@string/app_log"
		android:launchMode="singleTop"
		android:parentActivityName=".HubActivity"
		android:configChanges="orientation|keyboardHidden|screenSize"
		/>
	<activity android:name=".HubActivity" android:label="@string/app_hub"
		android:launchMode="singleTop"
		android:configChanges="orientation|keyboardHidden|screenSize"
		/>
	<activity android:name=".ConversationsActivity" android:label="@string/app_messages"
		android:launchMode="singleTop"
		android:parentActivityName=".HubActivity"
		android:configChanges="orientation|keyboardHidden|screenSize"
		/>
	<activity android:name=".StationActivity" android:label="@string/app_sta"
		android:parentActivityName=".HubActivity"
		android:configChanges="orientation|keyboardHidden|screenSize"
		/>
	<activity android:name=".MessageActivity" android:label="@string/app_sta"
		android:configChanges="orientation|keyboardHidden|screenSize"
		android:parentActivityName=".ConversationsActivity"
		android:alwaysRetainTaskState="true"
		/>
	<activity android:name=".PrefsAct" android:label="@string/app_prefs"
		android:parentActivityName=".HubActivity"
		/>
	<activity android:name=".BackendPrefs" android:label="@string/p__connection"
		android:parentActivityName=".PrefsAct"
		/>
	<activity android:name=".PrefSymbolAct" android:label="@string/p_symbol"
		android:parentActivityName=".PrefsAct"
		/>
	<activity android:name=".LocationPrefs" android:label="@string/p__location"
		android:parentActivityName=".PrefsAct"
		android:launchMode="singleTop"
		/>
	<activity android:name=".GoogleMapAct" android:label="@string/app_map"
		android:launchMode="singleTop"
		android:parentActivityName=".HubActivity"
		android:configChanges="orientation|keyboardHidden|screenSize"
		android:theme="@style/MapViewTheme" >
	</activity>
	<activity android:name=".MapAct" android:label="@string/app_map"
		android:launchMode="singleTop"
		android:parentActivityName=".HubActivity"
		android:configChanges="orientation|keyboardHidden|screenSize"
		android:theme="@style/MapViewTheme" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
		<category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
	</activity>
	<activity android:name=".ProfileImportActivity" android:label="@string/profile_import_activity">
	    <intent-filter>
		<action android:name="android.intent.action.VIEW" />
		<category android:name="android.intent.category.DEFAULT" />
		<category android:name="android.intent.category.BROWSABLE" />
		<data android:scheme="file"
			android:mimeType="*/*"
			android:host="*"
			android:pathPattern=".*\\.aprs" />
	    </intent-filter>
	    <intent-filter>
		<action android:name="android.intent.action.VIEW" />
		<category android:name="android.intent.category.DEFAULT" />
		<category android:name="android.intent.category.BROWSABLE" />
		<data android:scheme="content"
			android:mimeType="*/*"
			android:host="*"
			android:pathPattern=".*\\.aprs" />
	    </intent-filter>
	</activity>
	<activity android:name=".KeyfileImportActivity" android:label="@string/ssl_import_activity">
	    <intent-filter>
		<action android:name="android.intent.action.VIEW" />
		<category android:name="android.intent.category.DEFAULT" />
		<category android:name="android.intent.category.BROWSABLE" />
		<data android:scheme="file"
			android:mimeType="*/*"
			android:host="*"
			android:pathPattern=".*\\.p12" />
	    </intent-filter>
	    <intent-filter>
		<action android:name="android.intent.action.VIEW" />
		<category android:name="android.intent.category.DEFAULT" />
		<category android:name="android.intent.category.BROWSABLE" />
		<data android:scheme="content"
			android:mimeType="*/*"
			android:host="*"
			android:pathPattern=".*\\.p12" />
	    </intent-filter>
	    <intent-filter>
		<action android:name="android.intent.action.VIEW" />
		<category android:name="android.intent.category.DEFAULT" />
		<category android:name="android.intent.category.BROWSABLE" />
		<data android:scheme="content"
			android:mimeType="application/x-pkcs12" />
	    </intent-filter>
	</activity>
	<service android:name=".AprsService" android:label="@string/aprsservice">
	    <intent-filter>
		<action android:name="org.aprsdroid.app.SERVICE" />
		<action android:name="org.aprsdroid.app.ONCE" />
		<action android:name="org.aprsdroid.app.SEND_PACKET" />
		<action android:name="org.aprsdroid.app.SERVICE_STOP" />
		<action android:name="org.aprsdroid.app.FREQUENCY" />
	    </intent-filter>
	</service>
	<!-- start the service if applicable on boot -->
	<receiver android:name=".SystemEventReceiver">
	    <intent-filter>
		<action android:name="android.intent.action.BOOT_COMPLETED"/>
	    </intent-filter>
	</receiver>
    </application>
</manifest>
