Package basic

Source Code of basic.CurrentTrackDemo

package basic;

import com.jitcaforwin.basic.iTunesApp;
import com.jitcaforwin.basic.api.IITTrack;
import com.jitcaforwin.basic.api.IiTunes;
import com.jitcaforwin.main.exceptions.JitcaException;

public class CurrentTrackDemo {

  public static void main(String args[]) {
    try {
      IiTunes iTunes = new iTunesApp();
      IITTrack track = iTunes.getCurrentTrack();

      if (track == null) {
        System.out.println("Currently no track played!");
      } else {
        System.out.println(track.getName() + " by " + track.getArtist()
            + " is currently played. \n");
        ;
      }

      iTunes.close();

    } catch (JitcaException e) {
      e.printStackTrace();
    }

  }
}
TOP

Related Classes of basic.CurrentTrackDemo

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.