[android-developers] Music Playing

2011-05-09 Thread Felix Garcia Lainez
Hi,

I would like to add some music functionality on my application. The
idea is to show a list of device songs/albums/artists, and after user
choose some of them, then start playing on my application. Also i
would like to have some basic controls in one of my activities (next,
prev, pause/play)...

What would be the best way to implement something like this?

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Music Playing

2011-05-09 Thread Felix Garcia Lainez
Hi,

I would like to add some music functionality on my application. The
idea is to show a list of device songs/albums/artists, and after user
choose some of them, then start playing on my application. Also i
would like to have some basic controls in one of my activities (next,
prev, pause/play)...

What would be the best way to implement something like this?

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Music Playing

2011-05-09 Thread gaurav gupta
hi , u sud to fetch ur all music from ur sdcard,which will be stored with
all detail information like album,artist.
then fetch it , display all the songs in a listview and its onclick listener
will start mediaplayer and that particular song_uri
in default media player of android , u will find forward ,backward , play
,pause button inbuilt.
for more functionality u need to creat ur own  custom media player.

i hope it will work 4 u

On Mon, May 9, 2011 at 2:22 PM, Felix Garcia Lainez fgarcialai...@gmail.com
 wrote:

 Hi,

 I would like to add some music functionality on my application. The
 idea is to show a list of device songs/albums/artists, and after user
 choose some of them, then start playing on my application. Also i
 would like to have some basic controls in one of my activities (next,
 prev, pause/play)...

 What would be the best way to implement something like this?

 Thanks!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Music playing causes SoundPool Notification Stream to play at half volume

2010-02-11 Thread Guy Hoffman
It seems that a combination of SoundPool and music playing has an
unexpected and unwanted behavior:

When music is playing (on STREAM_MUSIC), even if its volume is down,
the sounds played by SoundPool (on STREAM_NOTIFICATION) are at 50% of
the volume than when no music is playing. This is the code I'm using:

code

SoundPool soundPool = new SoundPool(1,
AudioManager.STREAM_NOTIFICATION, 0);

// a few of those:

sound_id = soundPool.load(context,
context.getResources().getIdentifier(
 sound1, raw,
com.package.name)
,1),

// later this:

final AudioManager manager = (AudioManager)
context.getSystemService(Context.AUDIO_SERVICE);
final int volume =
manager.getStreamVolume(AudioManager.STREAM_MUSIC);

manager.setStreamVolume(AudioManager.STREAM_MUSIC, volume/2,
0);

soundPool.play(sound_id, 1f, 1f, 1, 0, 1);

new Handler().postDelayed(new Runnable() {
public void run() {
manager.setStreamVolume(AudioManager.STREAM_MUSIC,
volume, 0);
}
}, 1000);

/code

If no music is currently playing, the sounds are at full volume, nice
and clear. If music is playing, the music gets attenuated correctly,
but the sound still only plays at 50% volume.

If anyone knows anything about this, or a workaround, I would really
love to know.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en