Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chhoda

macrumors 6502
Original poster
Oct 25, 2008
285
1
I need to solve a problem, where I need to write an application which gets called after a certain usb device is inserted into my mac. how would I do that ?

are there more than one ways ? can I do it in java ? can anybody point me to some examples

--CH
 
:D

If you know C it's not too hard to write a daemon that works with the IOHID API to get connect/disconnect notifications for your device which you could then use to launch your Java app.

Just use the code in the URL above and modify it to detect your device.

I imagine there is some Java/USB library out there somewhere though... maybe someone ported libusb.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.