Giter Site home page Giter Site logo

Comments (9)

omerb09 avatar omerb09 commented on May 23, 2024 1

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.

vbuberen avatar vbuberen commented on May 23, 2024 1

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.

omerb09 avatar omerb09 commented on May 23, 2024 1

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.

omerb09 avatar omerb09 commented on May 23, 2024

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.

omerb09 avatar omerb09 commented on May 23, 2024

Thanks @vbuberen this version seems to work

from flutter-assetsaudioplayer.

vbuberen avatar vbuberen commented on May 23, 2024

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.

mjjoshi avatar mjjoshi commented on May 23, 2024

@vbuberen @omerb09 can you please share me version

from flutter-assetsaudioplayer.

vbuberen avatar vbuberen commented on May 23, 2024

can you please share me version
There is no version. You need to use version from master. It is specified a few messages above how to add a dependency pointing to the right commit.

from flutter-assetsaudioplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.