14 Replies - 1274 Views - Last Post: 15 October 2009 - 05:35 PM Rate Topic: -----

#1 ts230  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 225
  • Joined: 11-July 09

Java transfer music to iPod

Posted 24 September 2009 - 01:20 PM

Hi there!

I have to implement something for my jTunes. How can I transfer mp3 or other music files to an iPod? I have no idea, I just know it will appear as a removable device. I also know that there is some kind of directory structure inside it. Does anyone know anything that could help me??
Is This A Good Question/Topic? 0
  • +

Replies To: Java transfer music to iPod

#2 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 562
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Java transfer music to iPod

Posted 24 September 2009 - 02:33 PM

Do you intend on doing this using java sound? If so, first you are going to have to find an external library that handles mp3's, java sound doesnt (or the last I heard it didnt). If I remember, your on a mac? There are quite a good number of external libraries for this platform which seem better than java sound (looking at the api). Never used them though. Does your ipod have bluetooth? Or do you plan on transfering through usb?
Was This Post Helpful? 0
  • +
  • -

#3 ts230  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 225
  • Joined: 11-July 09

Re: Java transfer music to iPod

Posted 24 September 2009 - 04:50 PM

No. I use linux. When I connect my iPod nano, it shows up as a Mass Storage Device. I then want to put the mp3's on the iPod so they can be played on there. I don't want to play them in java, I just want to get them onto the iPod.
Was This Post Helpful? 0
  • +
  • -

#4 DaneAU  Icon User is offline

  • Great::Southern::Land
  • member icon

Reputation: 284
  • View blog
  • Posts: 1,617
  • Joined: 15-May 08

Re: Java transfer music to iPod

Posted 25 September 2009 - 06:22 AM

Connect it and hava a look as to where the actual object is mounted from ~ eg.
My DVD in the drive at Current ~
/media/SU1110.001

It could also be in /dev/ ~ i only have an mp3 player to test this with and have not tested it. If you are trying to write files and delete files from your device, you might be worth while looking into some opensource linux media players with ipod support, read the modules for this and see if that helps
Was This Post Helpful? 0
  • +
  • -

#5 Hiram  Icon User is offline

  • D.I.C Head

Reputation: 69
  • View blog
  • Posts: 203
  • Joined: 02-June 09

Re: Java transfer music to iPod

Posted 25 September 2009 - 06:40 AM

I was looking this up last week, it's a lot easier to do in C++ with libgpod. Because Apple use a heap of proprietary stuff for writing to the iPod database, you can't freely put music on there, which is where libgpod I mentioned before comes in handy because it can handle the database just fine.

All I could recommend, sadly, is that you write your own library using libgpod, or you do it in C++.
Was This Post Helpful? 0
  • +
  • -

#6 DaneAU  Icon User is offline

  • Great::Southern::Land
  • member icon

Reputation: 284
  • View blog
  • Posts: 1,617
  • Joined: 15-May 08

Re: Java transfer music to iPod

Posted 25 September 2009 - 06:48 AM

Yea thats what i was thinking might be the problem Hiram - dam Apple :(
Was This Post Helpful? 0
  • +
  • -

#7 ts230  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 225
  • Joined: 11-July 09

Re: Java transfer music to iPod

Posted 25 September 2009 - 06:57 AM

I could write a C++ library and then use it from Java using JNI?

<Edit>
Can anyone help me with the JNI library?
</Edit>

This post has been edited by ts230: 25 September 2009 - 07:02 AM

Was This Post Helpful? 0
  • +
  • -

#8 javafreak  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 11
  • View blog
  • Posts: 97
  • Joined: 21-September 09

Re: Java transfer music to iPod

Posted 25 September 2009 - 08:30 AM

http://www.codetoad...._mp3_player.asp
Was This Post Helpful? 1
  • +
  • -

#9 ts230  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 225
  • Joined: 11-July 09

Re: Java transfer music to iPod

Posted 25 September 2009 - 03:31 PM

OK. That helps with playing MP3's. But is there anyone that can help me with the JNI library to put music onto my iPod?
Was This Post Helpful? 0
  • +
  • -

#10 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 562
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Java transfer music to iPod

Posted 25 September 2009 - 04:10 PM

Do you really need to have the final result done in java? Really a bad language to use for this, there is just no support out there for this type of thing (unless you luckily find some). If you write a library in c++, why not just use this?
Was This Post Helpful? 0
  • +
  • -

#11 ts230  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 225
  • Joined: 11-July 09

Re: Java transfer music to iPod

Posted 25 September 2009 - 09:08 PM

Because I want it to be Cross Platform. And Java is cool. And I could just use JNI to call the C++ library. This can't be that difficult, can it? I could just leave the iPod support out for now, until I get an easier way to do this.
Was This Post Helpful? 0
  • +
  • -

#12 bruno38  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-October 09

Re: Java transfer music to iPod

Posted 15 October 2009 - 02:24 PM

Hi,
I have almost the same quest: I cannot find a suitable Linux application to manage Podcast on my iPod nano.

I don't know a lot about JNI, but did you check http://mediachest.sourceforge.net/ ?
Looks like they are able to transfert music to the iPod and handle the Database hopefully.

But I didn't have time to test it yet. The application does way too much things. I hope I have time to extract only the part needed to manage Podcast on the iPod.
Was This Post Helpful? 0
  • +
  • -

#13 ts230  Icon User is offline

  • D.I.C Head

Reputation: 11
  • View blog
  • Posts: 225
  • Joined: 11-July 09

Re: Java transfer music to iPod

Posted 15 October 2009 - 04:51 PM

OK. I don't have linux anymore, I have a mac now. Is there a way now?
Was This Post Helpful? 0
  • +
  • -

#14 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 562
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: Java transfer music to iPod

Posted 15 October 2009 - 05:02 PM

Hmm, lol, do you have an issue with windows or somthing? The only os I feel comfortable with. What about if you do this. When you plug it in, it will create its own directory. Just get java to do a point to this directory, grab the files you require, and move them to your ipod directory. But then once again you back to the problem of finding an api which can do this for you, or working out a way to write it yourself.
Did you manage to create a c++ library?
I dont normally promote on this site, but you might get more success asking this type of question on the suns forums. You will be able to get an answer from someone who specialises in this type of field. If you ask in the java sound forum part of sun forums, there is a user call captfoss who is brilliant, and has helped me out many a time. You might have to wait a day for a reply, but its normally worth it. Alternatively, there are other brilliant people on this site who might be able to offer better advise.
Was This Post Helpful? 0
  • +
  • -

#15 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8334
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Java transfer music to iPod

Posted 15 October 2009 - 05:35 PM

View Postts230, on 25 Sep, 2009 - 08:08 PM, said:

Because I want it to be Cross Platform. And Java is cool. And I could just use JNI to call the C++ library. This can't be that difficult, can it? I could just leave the iPod support out for now, until I get an easier way to do this.

Java with JNI is not cross platform by definition
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1