Apart from all these changes mentioned in doc: https://pub.dev/packages/just_audio_background
I needed MainActivity to extend AudioServiceActivity and also neede MediaTag() to those audios that need to be played in background
await _audioPlayer.setAudioSource(
AudioSource.asset(
"assets/audio/db12/$currentKey.wav",
tag: MediaItem(
id: currentKey,
album: "album",
title: "title",
artist: "flutter jackson",
),
),
);