Switch music to the next
<p>I want to switch the music from the device music player to the to the next on Button click,I tried the code </p>

<pre><code>    changeButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub

            Intent i = new Intent(Intent.ACTION_MEDIA_BUTTON);
            synchronized (this) {
                        i.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MEDIA_NEXT));
                        sendOrderedBroadcast(i, null);

                        i.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_MEDIA_NEXT));
                        sendOrderedBroadcast(i, null);
             }

        }
    }) ;
</code></pre>

<p>But it Doesn't show any change.Is there any permission which I have to add. Somebody please help me to sort it out.</p>
