• Post Reply Bookmark Topic Watch Topic
  • New Topic

Auto detect iPod or other portable player device (no JNI)  RSS feed

D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking for pure Java solution (some Runtime.exec possible) to autodetect a portable player as iPod. The solution has to be portable, it means it should work for Windows and POSIX systems. The solution shouldn't expect that a device will contain certain file structure, for example iPod can be with clean disk. I'm trying to do:

The code has the following problems:
1. it will try to traverse entire tree unless Computer is first met node
2. isComputerNode(File) returns false even for actual computer node, it's JDK 1.6U1
Can somebody suggest more elegant solution performing really well since device presentense will be on polling base? Some hacks like are a bit scary.
Does somebody know how to eject device for Windows? I can use umnt in POSIX.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!