mirror of
https://github.com/Michatec/Radio.git
synced 2026-01-31 07:20:40 +00:00
171 lines
7.1 KiB
XML
171 lines
7.1 KiB
XML
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
|
|
<application
|
|
android:name=".Radio"
|
|
android:allowBackup="true"
|
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
|
android:fullBackupContent="@xml/backup_rules"
|
|
android:icon="@mipmap/ic_launcher"
|
|
android:label="@string/app_name"
|
|
android:largeHeap="true"
|
|
android:localeConfig="@xml/locales_config"
|
|
android:networkSecurityConfig="@xml/network_security_config"
|
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
android:supportsRtl="true"
|
|
android:theme="@style/AppTheme"
|
|
android:usesCleartextTraffic="true"
|
|
tools:targetApi="tiramisu">
|
|
|
|
<!-- ANDROID AUTO SUPPORT -->
|
|
<!-- https://developer.android.com/training/auto/audio/ -->
|
|
<meta-data
|
|
android:name="com.google.android.gms.car.application"
|
|
android:resource="@xml/automotive_app_desc" />
|
|
<meta-data
|
|
android:name="com.google.android.gms.car.notification.SmallIcon"
|
|
android:resource="@mipmap/ic_launcher" />
|
|
|
|
<!-- Main activity for radio station playback on phone -->
|
|
<activity
|
|
android:name=".MainActivity"
|
|
android:configChanges="orientation|screenSize"
|
|
android:windowSoftInputMode="adjustPan"
|
|
android:exported="true">
|
|
|
|
<!-- react to main intents -->
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
|
|
<!-- react to be recognized as a music player -->
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MUSIC_PLAYER" />
|
|
<category android:name="android.intent.category.CATEGORY_APP_MUSIC" />
|
|
</intent-filter>
|
|
|
|
<!-- react to voice searches, like "Play Security Now" -->
|
|
<intent-filter>
|
|
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
</intent-filter>
|
|
|
|
<!-- react to playlist-links based on file extension -->
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
|
|
<data android:scheme="http" />
|
|
<data android:scheme="https" />
|
|
<data android:host="*" />
|
|
<data android:pathPattern=".*\\.m3u" />
|
|
<data android:pathPattern=".*\\.m3u8" />
|
|
<data android:pathPattern=".*\\.pls" />
|
|
</intent-filter>
|
|
|
|
<!-- react to playlist-links based on mimetype -->
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
|
|
<data android:scheme="http" />
|
|
<data android:scheme="https" />
|
|
<data android:host="*" />
|
|
<data android:mimeType="audio/x-scpls" />
|
|
<data android:mimeType="audio/mpegurl" />
|
|
<data android:mimeType="audio/x-mpegurl" />
|
|
<data android:mimeType="application/pls+xml" />
|
|
<data android:mimeType="application/x-mpegurl" />
|
|
<data android:mimeType="application/vnd.apple.mpegurl" />
|
|
<data android:mimeType="application/vnd.apple.mpegurl.audio" />
|
|
<data android:mimeType="application/octet-stream" />
|
|
</intent-filter>
|
|
|
|
<!-- react to hls playlist-links based on mimetype -->
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
|
|
<data android:scheme="content" />
|
|
<data android:host="*" />
|
|
<data android:mimeType="audio/x-scpls" />
|
|
<data android:mimeType="audio/mpegurl" />
|
|
<data android:mimeType="audio/x-mpegurl" />
|
|
<data android:mimeType="application/pls+xml" />
|
|
<data android:mimeType="application/x-mpegurl" />
|
|
<data android:mimeType="application/vnd.apple.mpegurl" />
|
|
<data android:mimeType="application/vnd.apple.mpegurl.audio" />
|
|
</intent-filter>
|
|
|
|
<!-- react to "start player service" intents -->
|
|
<intent-filter>
|
|
<action android:name="com.michatec.radio.action.START_PLAYER_SERVICE" />
|
|
</intent-filter>
|
|
|
|
<!-- App Shortcuts -->
|
|
<meta-data
|
|
android:name="android.app.shortcuts"
|
|
android:resource="@xml/shortcuts" />
|
|
|
|
</activity>
|
|
|
|
|
|
<!-- Player Service -->
|
|
<service
|
|
android:name=".PlayerService"
|
|
android:enabled="true"
|
|
android:exported="true"
|
|
android:foregroundServiceType="mediaPlayback"
|
|
tools:ignore="ExportedService">
|
|
<intent-filter>
|
|
<action android:name="androidx.media3.session.MediaSessionService" />
|
|
<action android:name="android.media.browse.MediaBrowserService" />
|
|
<action android:name="com.michatec.radio.action.START_PLAYER_SERVICE" />
|
|
</intent-filter>
|
|
</service>
|
|
|
|
|
|
<!-- handles completed downloads -->
|
|
<receiver
|
|
android:name=".helpers.DownloadFinishedReceiver"
|
|
android:exported="true">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
|
|
</intent-filter>
|
|
</receiver>
|
|
|
|
|
|
<!-- handles media buttons -->
|
|
<receiver
|
|
android:name="androidx.media.session.MediaButtonReceiver"
|
|
android:exported="true">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
|
</intent-filter>
|
|
</receiver>
|
|
|
|
|
|
<!-- file provider -->
|
|
<provider
|
|
android:name="androidx.core.content.FileProvider"
|
|
android:authorities="${applicationId}.provider"
|
|
android:exported="false"
|
|
android:grantUriPermissions="true">
|
|
<meta-data
|
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
|
android:resource="@xml/provider_paths" />
|
|
</provider>
|
|
</application>
|
|
</manifest>
|