I’m trying to find a developer to write me a pretty basic program. I am also a developer, but don’t have enough time to write it myself.
This program has a pretty basic function. It will notify users, via some dialog (or alert) that some program is about to access the built in desktop / laptop camera. It could be skype or facetime, or whatever it is, the program should be aware of when the OS’s camera is going to be accessed and notify the user. Yes, even if the user is initiating the camera themselves via Skype, the notification would still appear.
My question is this. If I need this program written in Java, is it possible? Obviously I am trying to get it done in Java so it would run on Windows and Mac.
If it is not possible, then it seems as though I’d have to write 2 separate programs on Windows and Mac.
I’ve come here to get suggestions so that I can connect with the right developers. If you have any suggestions, I’d be happy to hear them. Thanks!
No, it isn’t possible to write an application that detects if the camera is being accessed in Java.
The reason for this is that the “is accessing a usb device that happens to be camera” is something that is part of the deep system calls of the operating system. To interrogate the system at this level, you need to be able to call methods against the system and hardware itself – something that java specifically abstracts away from you.
You might be able to write drivers for various cameras and access them in java, though each camera may require a different driver, and the driver for Windows is different than the driver for Mac.
You really need to abandon the requirement and idea that you will have a single application that works on both systems. You will need to write a native application that is able to talk to the operating system and ask it about what devices it has and what their status is. This isn’t something Java was designed for.
5