1. Check out our app, Forums for Android! Download and leave feedback here!

Android system music player

Discussion in 'Application Development' started by zhzhd82, Oct 9, 2010.

  1. zhzhd82

    zhzhd82 New Member
    Thread Starter
    6

    Apr 15, 2010
    2
    1
    6
    Hi all:
    I use the following codes to call android system music player:
    Uri uri = Uri.parse(url);
    Intent intent = new Intent();
    intent.setDataAndType(uri, "audio/*");
    intent.setAction(Intent.ACTION_VIEW);
    startActivity(intent);
    It can play music. But if I press back key the music stops playing.
    How to call android system music player and play background?
    Thank you very much!
     

    Advertisement

Share This Page

Loading...