Comments (9)
For my application this method worked. I just added permission to the manifest. "android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"
https://stackoverflow.com/a/76943772/16647487
from flutter-assetsaudioplayer.
Thanks to @omerb09 for pointing on a solution. I have made a PR which was already merged, so would suggest to try and use the plugin but point to that commit in master
:
assets_audio_player:
git:
url: https://github.com/florent37/Flutter-AssetsAudioPlayer.git
ref: 91638830570e5e3c2212d04fd99b8d3b60380dd3
from flutter-assetsaudioplayer.
I published my application with the version you mentioned for my test users. I didn't catch any errors with this issue. However, they threw out the error in #803. All errors occurred while the application was in the background. It also happened on Android 13 and 14.
from flutter-assetsaudioplayer.
I'm getting the same error. Is there any progress?
- Flutter version: 3.10.6,
- Assets Audio Player version : 3.1.1,
- Only Android 14 (Api 34) issue,
FATAL EXCEPTION: main
Process: com.hayt****, PID: 12092
java.lang.SecurityException: Starting FGS with type mediaPlayback callerApp=ProcessRecord{c60496 12092:com.hay****/u0a192} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK]
at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
at android.os.Parcel.createException(Parcel.java:3041)
at android.os.Parcel.readException(Parcel.java:3024)
at android.os.Parcel.readException(Parcel.java:2966)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6761)
at android.app.Service.startForeground(Service.java:775)
at com.github.florent37.assets_audio_player.notification.NotificationService.displayNotification(NotificationService.kt:349)
at com.github.florent37.assets_audio_player.notification.NotificationService.access$displayNotification(NotificationService.kt:32)
at com.github.florent37.assets_audio_player.notification.NotificationService$displayNotification$1.invokeSuspend(NotificationService.kt:148)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
from flutter-assetsaudioplayer.
Thanks @vbuberen this version seems to work
from flutter-assetsaudioplayer.
Oh, didn't expect that fast feedback. In such case could you tell me if it works Ok for you on other Android versions?
Because I feel that this issue is connected with #803 but I only have a device with Android 14 where I can't reproduce #803 now even though I could in September. I am just curios if this change for Android 14 that I made with my PR somehow also affected the issue on Android 13 due to that missing permission.
from flutter-assetsaudioplayer.
@vbuberen @omerb09 can you please share me version
from flutter-assetsaudioplayer.
can you please share me version
There is no version. You need to use version frommaster
. It is specified a few messages above how to add a dependency pointing to the right commit.
from flutter-assetsaudioplayer.
Related Issues (20)
- playlistFinished event is triggering onData even before the song has completed
- Missing Now Playing Card on Android TV HOT 1
- Color OS and Oxygen OS issue
- Please update to UUID to 4.1.0 HOT 1
- What do I need to clean up after using Assets Audio Player?
- Please update the latest version of assets_audio_player_web in pubspec.yaml file
- Open it and choose iOS, next song, previous song, or the previous 10 seconds and the next 10 seconds. HOT 1
- Buttons not working on notification in android 13
- two audio at same time
- Memory leaks
- Ios playlist feature is not working in ios
- DASH Streaming support on android and ios and web
- audio not working when the app is launched from the background HOT 1
- Can I preload audio assets on initState() or app launch?
- able to setpitch on IOS Platform.
- exception when do pub get
- No media visible in Android Auto HOT 2
- Privacy manifest file for iOS is missing
- RangeError fix
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-assetsaudioplayer.