title: Track info of currently playing music
body: <p>I am implementing an application related to getting current music track information.</p>
  
  <p>I am using the following code to get that:</p>
  
  <pre><code>public class CurrentMusicTrackInfoActivity extends Activity {
  
      public static final String SERVICECMD = "com.android.music.musicservicecommand";
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          IntentFilter iF = new IntentFilter();
          iF.addAction("com.android.music.metachanged");
          iF.addAction("com.android.music.playstatechanged");
          iF.addAction("com.android.music.playbackcomplete");
          iF.addAction("com.android.music.queuechanged");
  
          registerReceiver(mReceiver, iF);
      }
  
      private BroadcastReceiver mReceiver = new BroadcastReceiver() {
  
          @Override
          public void onReceive(Context context, Intent intent) {
              String action = intent.getAction();
              String cmd = intent.getStringExtra("command");
              Log.v("tag ", action + " / " + cmd);
              String artist = intent.getStringExtra("artist");
              String album = intent.getStringExtra("album");
              String track = intent.getStringExtra("track");
              Log.v("tag", artist + ":" + album + ":" + track);
              Toast.makeText(CurrentMusicTrackInfoActivity.this, track, Toast.LENGTH_SHORT).show();
          }
      };
  
  }
  </code></pre>
  
  <p>It is working fine for some mobiles only. I want to implement code to get current music track info in all Android devices (e.g. HTC and Samsung devices).</p>
  
  <p>Is there any way of doing this?</p>