<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2012-2018 Adrian Ulrich <adrian@blinkenlights.ch>
Copyright (C) 2012 Christopher Eby <kreed@kreed.org>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
	package="ch.blinkenlights.android.vanilla"
	android:versionName="1.0.59"
	android:versionCode="10591"
	android:installLocation="auto">
	<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="26" />
	<uses-permission android:name="android.permission.WAKE_LOCK" />
	<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
	<!-- This is needed for isWiredHeadsetOn() to work in some cases. (bug?) -->
	<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
	<application
		android:resizeableActivity="true"
		android:icon="@drawable/icon"
		android:label="@string/app_name">

		<meta-data
			android:name="com.mirrorlink.android.rockscout.allow-offline-access"
			android:value="true" />

		<provider
			android:name="android.support.v4.content.FileProvider"
			android:authorities="ch.blinkenlights.android.vanilla.fileprovider"
			android:exported="false"
			android:grantUriPermissions="true">
			<meta-data
				android:name="android.support.FILE_PROVIDER_PATHS"
				android:resource="@xml/provider_paths"/>
		</provider>

		<activity
			android:name="FullPlaybackActivity"
			android:launchMode="singleTask" />
		<activity
			android:name="LibraryActivity"
			android:theme="@style/Library"
			android:launchMode="singleTask">
			<intent-filter>
				<action android:name="android.intent.action.MAIN" />
				<category android:name="android.intent.category.LAUNCHER" />
				<category android:name="android.intent.category.APP_MUSIC" />
				<category android:name="android.intent.category.DEFAULT" />
			</intent-filter>

			<meta-data
				android:name="android.app.shortcuts"
				android:resource="@xml/shortcuts"/>

		</activity>
		<activity
			android:name="PlaylistActivity"
			android:launchMode="singleTask" />
		<activity
			android:name="MiniPlaybackActivity"
			android:theme="@style/PopupDialog"
			android:excludeFromRecents="true"
			android:launchMode="singleInstance" />
		<receiver
			android:name=".OneCellWidget"
			android:label="Vanilla Music 1x1">
			<intent-filter>
				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
			</intent-filter>
			<meta-data
				android:name="android.appwidget.provider"
				android:resource="@xml/one_cell_widget" />
		</receiver>
		<receiver
			android:name=".FourLongWidget"
			android:label="Vanilla Music 4x1 A">
			<intent-filter>
				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
			</intent-filter>
			<meta-data
				android:name="android.appwidget.provider"
				android:resource="@xml/four_long_widget" />
		</receiver>
		<receiver
			android:name=".FourWhiteWidget"
			android:label="Vanilla Music 4x1 White">
			<intent-filter>
				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
			</intent-filter>
			<meta-data
				android:name="android.appwidget.provider"
				android:resource="@xml/four_white_widget" />
		</receiver>
		<receiver
			android:name=".WidgetE"
			android:label="Vanilla Music 4x1 B">
			<intent-filter>
				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
			</intent-filter>
			<meta-data
				android:name="android.appwidget.provider"
				android:resource="@xml/widget_e" />
		</receiver>
		<receiver
			android:name=".FourSquareWidget"
			android:label="Vanilla Music 2x2 A">
			<intent-filter>
				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
			</intent-filter>
			<meta-data
				android:name="android.appwidget.provider"
				android:resource="@xml/four_square_widget" />
		</receiver>
		<receiver
			android:name=".WidgetD"
			android:label="Vanilla Music 2x2 B">
			<intent-filter>
				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
			</intent-filter>
			<meta-data
				android:name="android.appwidget.provider"
				android:resource="@xml/widget_d" />
		</receiver>
		<receiver android:name="MediaButtonReceiver" >
			<intent-filter android:priority="999">
				<action android:name="android.intent.action.MEDIA_BUTTON" />
			</intent-filter>
		</receiver>
		<service android:name="PlaybackService">
			<intent-filter>
				<action android:name="ch.blinkenlights.android.vanilla.action.PLAY" />
				<action android:name="ch.blinkenlights.android.vanilla.action.PAUSE" />
				<action android:name="ch.blinkenlights.android.vanilla.action.TOGGLE_PLAYBACK" />
				<action android:name="ch.blinkenlights.android.vanilla.action.NEXT_SONG" />
				<action android:name="ch.blinkenlights.android.vanilla.action.PREVIOUS_SONG" />
			</intent-filter>
		</service>

		<service
			android:name=".MirrorLinkMediaBrowserService"
			android:exported="true">
			<intent-filter>
				<action android:name="android.media.browse.MediaBrowserService" />
			</intent-filter>
		</service>

		<service
			android:name=".ScheduledLibraryUpdate"
			android:permission="android.permission.BIND_JOB_SERVICE"
			android:exported="true"/>

		<activity
			android:name="PreferencesActivity" />
		<activity
			android:name="TabOrderActivity" />
		<activity
			android:name="FilebrowserStartActivity" />
		<activity
			android:name="MediaFoldersSelectionActivity" />
		<activity
			android:name="PermissionRequestActivity"
			android:theme="@android:style/Theme.Translucent.NoTitleBar" />

		<activity
			android:name="ShortcutPseudoActivity"
			android:theme="@android:style/Theme.Translucent.NoTitleBar" />

		<activity android:name="AudioPickerActivity" android:theme="@style/PopupDialog"
			android:excludeFromRecents="true" android:exported="true" >
			<intent-filter>
				<action android:name="android.intent.action.VIEW" />
				<category android:name="android.intent.category.DEFAULT" />
				<data android:scheme="file"/>
				<data android:mimeType="audio/*"/>
				<data android:mimeType="application/ogg"/>
				<data android:mimeType="application/x-ogg"/>
				<data android:mimeType="application/x-flac"/>
				<data android:mimeType="application/itunes"/>
			</intent-filter>
			<intent-filter>
				<action android:name="android.intent.action.VIEW" />
				<category android:name="android.intent.category.DEFAULT" />
				<data android:scheme="content"/>
				<data android:mimeType="audio/*"/>
				<data android:mimeType="application/ogg"/>
				<data android:mimeType="application/x-ogg"/>
				<data android:mimeType="application/x-flac"/>
				<data android:mimeType="application/itunes"/>
			</intent-filter>
		</activity>

		<activity android:name="AudioSearchActivity" android:theme="@style/PopupDialog"
			android:excludeFromRecents="true">
			<intent-filter>
				<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
				<category android:name="android.intent.category.DEFAULT" />
			</intent-filter>
		</activity>



		<meta-data
			android:name="com.google.android.backup.api_key"
			android:value="AEdPqrEAAAAIEViwBxSHCdBCOOat4Go_5gSxFU7PhRFjLTeRAw" />

	</application>
</manifest>
