Questions tagged [audio-service]

audio_service plugin for Flutter

Use for questions about the audio_service plugin for Flutter

118 questions
1
vote
1 answer

How to handle errors thrown within AudioHandler implementations?

For the sake of the argument let's say I have an implementation of BaseAudioHandler in my application: class AudioPlayerHandler extends BaseAudioHandler { @override Future play() async { throw Error(); } } Then when I call…
1
vote
0 answers

How to add android auto support for an already existing Flutter application

I already have a music application built in Flutter. The music uses audio_service and just_audio. I am currently looking to add an Android Auto support for the music application built using Flutter. I have been going through the site…
1
vote
0 answers

Both of Flutter audio service and FCM need to change the android name. How can I integrate it?

Flutter audio service need to change the android:name like this android:name="com.ryanheise.audioservice.AudioServiceActivity" package and documation Firebase Cloud Messaging also need to change the android:name like…
1
vote
0 answers

Flutter custom native plugin conflicts with project code

For the Flutter app I’m working on, the company had a third party develop native Android and iOS code for an alarm to integrate into our app. I ran their sample app that they made and it ran just fine. I copied the code over to my project and kept…
1
vote
1 answer

Audio service stops working in background in Android 12 (but is working properly on android 11 and below)

Basically the question, I have implemented Audio service properly as its working on devices android 11 or less. But on android 12 at around 10mins It stops working as the audio playback stops the background notification is automatically removed. My…
Harsh Vardhan
  • 559
  • 1
  • 3
  • 12
1
vote
1 answer

Icon not show properly in notification in audio_service flutter

I am using audio_service flutter package for playing audio on background and control from lock screen and notification bar. This is working fine. I just facing issue for icon which not showing in android while in iOS icon is showing but it's show…
Kinjal
  • 11
  • 1
1
vote
0 answers

Flutter - How to set playback timer in audio_service?

I am using audio_service package for playing background audio.Now, I want to stop the currently playing playlist or audio after certain time set by the user. Is there any better approach of doing this? I have implemented the code provided in the…
Ranjit Shrestha
  • 622
  • 6
  • 24
1
vote
0 answers

Not getting headset play/pause event using audio_service

I have a Flutter app running on iOS and I want to use the play/pause button on a wired headset to serve as a way to remotely trigger an action in my app. It's not a music app, so my implementation is simple. I'm using audio_service 0.18.4 and I…
error910
  • 11
  • 1
1
vote
1 answer

How to modify UI in notification flutter?

I'm making a music player application by following this tutorial using packages from audio_service: ^0.18.4 just_audio: ^0.9.20 the music player app runs smoothly, but I want to add a button in the notification view section, is there a way to do…
1
vote
0 answers

Audio Service How to retrieve a variable with a StateFul widget

For my project I use the packages audioplayers for my audio sound and I need to use the sound in background and to control it with the notification and for that I use the package audio_service and now I have a problem. First of all I want to precise…
Yuno60
  • 11
  • 1
1
vote
2 answers

Can we retrieve the same updated media item with added Duration in Dart [Flutter] which is derived from Cloud Firestore?

I have problem with [audio_service][1] of Dart's package inside Flutter. It has trouble in reading the duration of current MediaItem. As written in its official documentation [here][2], we are asked to create a new MediaItem to store the copied…
Wege
  • 105
  • 9
1
vote
0 answers

flutter audio service not showing notification control on android 11

I am using audioservice with audioplayers. The notification and audio are playing properly on Android 9 on both real device and emulator. But when i check on newer android versions like android 11 on real device the audio is working fine but the…
1
vote
2 answers

How to pass data down the widget tree?

I have read and understood a similar question posted here, but am having trouble applying it to my use case. I am new to Flutter and am creating an app that streams audio from a given URL using Ryan Heise's audio_service plugin. Using this plugin I…
1
vote
0 answers

Why does my App crash using audio_service and flutter_background_geolocation together?

I am using the audio_service package as well as the flutter_background_geolocation package in my application. Both packages are configured for Android as described in their documentation. When clicking the back button of my device, the app closes.…
Martin Seubert
  • 978
  • 3
  • 21
  • 37
1
vote
0 answers

Play current song using just_audio and audio_service flutter

I have two display page.One is listview and another one is audio display.I want to make when I click item in listview and I will pass audio link to audio display page and play this song.But I also want to add previous and next button and when I…
Neural
  • 370
  • 1
  • 11