Questions tagged [android-music-player]

623 questions
3
votes
1 answer

Android: How to run google music's "Shuffle all" with shell commands or intents?

I want to press "Shuffle all" button in the player's menu with any way if it's even possible. I know how to emulate keypresses, so it's possible to do this with DPAD emulation (if your device is rooted) via simple shell command input keyevent, but…
3
votes
0 answers

Play and pause music applications other than default (e.g. Pandora)

I am currently working on an app where I need to use TTS. The problem is that if the user is listening to music, you cant hear TTS. I have figured out that I can use AudioFocus to temporarily take focus, and then release it. Taking the focus pauses…
3
votes
1 answer

Android MP3 file Filtering form sdcard

I have developing the application to fetching data from sd card. I used this option for filtering but when I used logcat I found that I only get data of only file sdcard/some_dir But I have sound files into different folder so if possible give me…
full Error
  • 308
  • 3
  • 8
  • 21
3
votes
1 answer

Android's MediaPlayer prepareAsync() timeout?

I am using MediaPlayer's prepareAsync() function. My code looks like: try { mediaPlayer.setDataSource(stream_url); mediaPlayer.prepareAsync(); } catch (Exception e) { e.printStackTrace(); } mediaPlayer.setOnPreparedListener(new…
Alexis
  • 23,545
  • 19
  • 104
  • 143
2
votes
1 answer

Take music files on memory card using phonegap for android music player

I am trying to create a music player using phonegap for android.How could I collect the mp3 files in my memory card to list in my player.
Nithin Das
  • 43
  • 4
2
votes
1 answer

Orientation change and Android VideoPlayer? What is going on?

I have the following code which searches a text file on my phone's sd card for the url of a song on a webserver. I am able to shuffle the song by turning the phone to change the orientation and I do not understand where that logic is coming from. Is…
sealz
  • 5,348
  • 5
  • 40
  • 70
2
votes
0 answers

AudioManager.OnAudioFocusChangeListener() doesn't work after AudioManager.AUDIOFOCUS_LOSS in Kotlin

I try to make music player service when another music player is playing, the player from my app is paused. If another music player is paused or stopped, music from my app is playing. When the focusChange in AudioManager.OnAudioFocusChangeListener()…
2
votes
2 answers

how to break instance of previous song?

I am making an audio player in reactjs that looks like this , song box is rendered in map function and on click on any song box it start playing, but the problem is when click on next song to change the track, the audio src value gets changed but…
abhi jain
  • 41
  • 1
  • 5
2
votes
0 answers

ExoPlayer Notifications appear onTop of notification bar in Android 12

The Noticiation laods fine but its located ontop of my notification bar. I'am using Android 12 on a Noxia X10 Please Help me out Code: private fun createNotificationChannel() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { …
2
votes
0 answers

How to stream only the audio of a song, from the songs Youtube URL in Flutter?

How to stream only the audio of a song, from the song's Youtube URL in flutter? I tried downloading the audio file of the song from the Youtube URL and playing it. Instead of downloading it, I need to stream it online. Is there any way to do this in…
2
votes
1 answer

How do I get the list of files in the MUSIC folder on Android Q and above?

I've been bringing up the list of files in the folder as below, but I can't use the method below in Android Q(Android 10) or higher. How do I load a list of files in the MUSIC folder using MediaStore? public void getFileListInFolder() { String…
2
votes
1 answer

how can I clear notifications in android studio (java)

I have this media player project and I have foreground service in it which allows me to control the song through notifications even if I clear the app in the background. Everything is working fine including the controls in the notification.…
2
votes
1 answer

How to play multiple audio files simultaniously in flutter

I have been trying to run the multiple audio files at the same time each having a separate mute button. I have tried AudioPlayer Flutter plugin. I have tried the following code but it makes the files run one by one, not simultaniously. Please…
kiran
  • 100
  • 2
  • 10
2
votes
1 answer

how to use slider as progress bar and control audio in kivy python?

I am making a music player for android and now I am successful to play and pause the song but theproblem is that as in other music player app like Spotify or Google Play Music we have a slider at the bottom and we can use that slider to control…
2
votes
0 answers

How to put external audio or video file in emulator android studio?

I am a beginner android app developer. and right now I am developing an android app that can fetch all the audio files from the phone and play them, but my actual phone is malfunctioning and due to COVID 19 lockdown all the service center is…