-
Notifications
You must be signed in to change notification settings - Fork 473
Add support to make AndroidForegroundService optional to MediaElement #2658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ne0rrmatrix
wants to merge
46
commits into
CommunityToolkit:main
Choose a base branch
from
ne0rrmatrix:MediaElementOptionService
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
14eab7b
Add support to make AndroidForegroundService optional to MediaElement
ne0rrmatrix 44a9928
Rename foreground service property for clarity
ne0rrmatrix c683d61
Update media playback service and permissions
ne0rrmatrix 0feee28
Add tests for AndroidForegroundService default behavior
ne0rrmatrix f6407f6
Set service on by default
ne0rrmatrix 63ad21b
Remove old intent filter that was added by accident
ne0rrmatrix 1e60956
Rename AndroidForegroundServiceEnabled property
ne0rrmatrix 5a3c0fe
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 904ae95
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix ea35514
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix cecaf32
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 178e8ae
Enable Android Foreground Service for MediaElement
ne0rrmatrix 25b22c6
Merge branch 'MediaElementOptionService' of https://github.com/ne0rrm…
ne0rrmatrix 1168302
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 838d9a5
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 7aba464
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix a83de86
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix ed62a22
Update src/CommunityToolkit.Maui.MediaElement/MediaElementOptions.sha…
ne0rrmatrix 84b337c
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 58e07a8
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix cb63525
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 54830f8
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 74dfd56
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix e205ac3
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 8599d5c
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 9b20b70
Refactor MediaElement Android Foreground Service config
ne0rrmatrix 0588103
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix ca6ec4a
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 7a4e51b
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix af24853
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix d00dcf7
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 747f95b
Merge branch 'main' into MediaElementOptionService
ne0rrmatrix 4106c25
Switch to using using OptIn and move from options to builder to set s…
ne0rrmatrix 045e95f
Merge branch 'MediaElementOptionService' of https://github.com/ne0rrm…
ne0rrmatrix eeeba09
Fix tests
ne0rrmatrix 859eb74
Require enableForegroundService param for MediaElement init
ne0rrmatrix 349607a
Remove Analyzer and associated tests
ne0rrmatrix a783e5b
Update src/CommunityToolkit.Maui.UnitTests/Views/MediaElement/MediaEl…
ne0rrmatrix 268abca
Update comment to add href to documentation for MediaElement when set…
ne0rrmatrix f6dc22a
Update URL to not be region specific
ne0rrmatrix 5b2e117
Update MediaElementOptions tests to reflect no default value for whet…
ne0rrmatrix 28f912a
Copilot Suggestion
ne0rrmatrix 9eb07b8
Copilot Sugestions and update test to remove setting default for Serv…
ne0rrmatrix 2094ae8
Update src/CommunityToolkit.Maui.UnitTests/BaseTest.cs
ne0rrmatrix 20c3af6
Copilot suggestions
ne0rrmatrix 483a6d7
C# standards
ne0rrmatrix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 30 additions & 19 deletions
49
samples/CommunityToolkit.Maui.Sample/Platforms/Android/AndroidManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,36 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <application android:allowBackup="true" android:icon="@mipmap/appicon" android:enableOnBackInvokedCallback="true" android:hardwareAccelerated="true" | ||
| android:supportsRtl="true"> | ||
|
|
||
| <meta-data android:name="com.google.android.geo.API_KEY" android:value="PASTE-YOUR-API-KEY-HERE" /> | ||
| </application> | ||
|
|
||
| <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | ||
| <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> | ||
| <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | ||
| android:supportsRtl="true"> | ||
|
|
||
| <!-- Samsung --> | ||
| <uses-permission android:name="com.sec.android.provider.badge.permission.READ"/> | ||
| <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/> | ||
| <!-- /Samsung --> | ||
| <meta-data android:name="com.google.android.geo.API_KEY" android:value="PASTE-YOUR-API-KEY-HERE" /> | ||
|
|
||
| <uses-permission android:name="android.permission.RECORD_AUDIO"/> | ||
| <uses-permission android:name="android.permission.CAMERA"/> | ||
| <queries> | ||
| <intent> | ||
| <action android:name="android.intent.action.TTS_SERVICE"/> | ||
| </intent> | ||
| </queries> | ||
| <service android:name="communityToolkit.maui.media.services" android:stopWithTask="true" android:exported="false" android:enabled="true" | ||
| android:foregroundServiceType="mediaPlayback"> | ||
| <intent-filter> | ||
| <action android:name="androidx.media3.session.MediaSessionService"/> | ||
| </intent-filter> | ||
| </service> | ||
| </application> | ||
|
|
||
| <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | ||
| <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> | ||
| <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | ||
|
|
||
| <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> | ||
| <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/> | ||
| <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/> | ||
| <uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL"/> | ||
ne0rrmatrix marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <!-- Samsung --> | ||
| <uses-permission android:name="com.sec.android.provider.badge.permission.READ"/> | ||
| <uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/> | ||
| <!-- /Samsung --> | ||
|
|
||
| <uses-permission android:name="android.permission.RECORD_AUDIO"/> | ||
| <uses-permission android:name="android.permission.CAMERA"/> | ||
| <queries> | ||
| <intent> | ||
| <action android:name="android.intent.action.TTS_SERVICE"/> | ||
| </intent> | ||
| </queries> | ||
| </manifest> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.