android-music-player

Android Exerciser Monkey starts playing audio files at random

二次信任 提交于 2019-12-04 18:09:53
问题 I'm running exerciser monkey to test my android app. As part of my app I play media files which give the pronunciation of a words. I've put the files in a directory where they aren't readable by the Android's Music player. However, the exerciser monkey throws some sequence of events which seem to activate the music player, which then repetitively play the beginning of another mp3 file (which is not from my app) during its testing. How is it doing this, and is it something I should be

Android list music by folders and play them

半城伤御伤魂 提交于 2019-12-04 14:21:40
问题 I'm developing music player for android that is already on the market. Users are asking to add a Folder view to list all folders that has music in their smartphone and I want to develop it. MediaStore already know which are the correct paths to follow (because it needs to know them to re-scan every times the sdcard) so I was wondering if there is a way to get those paths and use them to show music to the user. Another options (but I don't like it) to get those paths is to query MediaStore for

Android application to Pause/Resume the music of another music player app

筅森魡賤 提交于 2019-12-04 11:58:04
问题 In my Android application, I am playing different mp3 files using the MediaPlayer class. The user is playing his/her own music with the default music application. I want to: Pause the music of the default music application. Start playing music from my application. When my music is done playing, my app will resume the user's default music. I want to pause and resume the music of the default music player from my application. Is it possible to do this? 回答1: The following code will pause a

How to I achieve ViewPager (next/previous) in Music player App

只谈情不闲聊 提交于 2019-12-03 15:35:47
I want to know how I can achieve next and previous using swipe via a view pager. The final result I want is the one that Google Play Music has. I have uploaded a picture of what my app is behaving like and also what I expect. I basically cannot get my ViewPager to show me previews of the next and previous tracks. Can anyone please help me with how I can populate the view pager with pages of the tracks I want to play hence achieving that Google play music next/previous swipe in their music playback screen. public class PlayPagerAdapter extends FragmentStatePagerAdapter { final String POSITION =

How to create a new Playlist using ContentResolver

情到浓时终转凉″ 提交于 2019-12-03 13:21:19
I'm attempting to create a new Playlist , using Android's ContentResolver , that will be added to music player's playlists, but when the code runs, the insert into the playlist returns null (for the Uri ) and when I check the music player's playlists, my new Playlist entry isn't there. I suspect that the reason that the insert() returns null is because I haven't created the Playlist correctly. Could someone clarify how to dynamically create a new playlist, given that my code doesn't work. (In my searching, I've found several way to query playlists, but nothing actually creates a new one) Here

Android list music by folders and play them

岁酱吖の 提交于 2019-12-03 08:59:31
I'm developing music player for android that is already on the market. Users are asking to add a Folder view to list all folders that has music in their smartphone and I want to develop it. MediaStore already know which are the correct paths to follow (because it needs to know them to re-scan every times the sdcard) so I was wondering if there is a way to get those paths and use them to show music to the user. Another options (but I don't like it) to get those paths is to query MediaStore for all the music in the library and loop on them to get the common base paths. But if user have more than

how to get album image using musicbrainz

核能气质少年 提交于 2019-12-03 08:51:53
问题 I don't know whether I can ask such question here or not. My question is as below. I am making music player on my own and I want to download album images for those songs which don't have album image. Just like what N7Music Player is doing. I did some search on my own and I came to know that using MusicBrainz we can download images. I looked for its API but I am not getting it clearly. I have following doubts. How to get its API key? Is it free? How to make call to API if artist and song name

how to get album image using musicbrainz

白昼怎懂夜的黑 提交于 2019-12-02 21:28:37
I don't know whether I can ask such question here or not. My question is as below. I am making music player on my own and I want to download album images for those songs which don't have album image. Just like what N7Music Player is doing. I did some search on my own and I came to know that using MusicBrainz we can download images. I looked for its API but I am not getting it clearly. I have following doubts. How to get its API key? Is it free? How to make call to API if artist and song name is known to fetch album image for that song? I am waiting for your valuable responses. Thanking you in

VideoView with Gesture(Swipe function) in android

∥☆過路亽.° 提交于 2019-12-02 18:55:53
I want to combine default VideoView and gesture listener , I want to implement likewise on VideoView if user swipe left then song plays backward or swipe right then song plays forward. open default media player via following code : Intent intent = new Intent("android.intent.action.MUSIC_PLAYER"); startActivity(intent); then how to add gesture listener ..?? i got that how to combine VideoView and GestureListener : layout file activity_main.xml : <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android

How to play or resume music of another music player from my code

為{幸葍}努か 提交于 2019-12-02 16:51:31
In my Android app I want to play or resume the played music after I pause it. I got my app to pause the music by sending a broadcast , but I can't get it to play or resume the music. Here is the code to pause: Intent i = new Intent("com.android.music.musicservicecommand"); i.putExtra("command", "pause"); sendBroadcast(i); Here is what I have discovered after testing these. I have tried and verified these commands to work just fine. // pause Intent i = new Intent("com.android.music.musicservicecommand"); i.putExtra("command", "pause"); sendBroadcast(i); // play Intent i = new Intent("com