Can a java application interface with an ipad?
I am working on a research project to create a system to control electronic music through a touch screen. We're planning on building out own special screen for this purpose, but that won't be ready for some time, and I need to start working on the software now. I've been given an ipad to use as a temporary test bed touch screen.
So, it looks like I'll be creating my software in java, and I need to find some way to interface the touch information from the ipad with my code. The connection doesn't need to be wireless. In a perfect world, I would even send display information to the ipad, but that's not a necessary feature. I mostly need to be able to test out multi touch functionality in my control engine before I get my hands on the actual screen we'll be using.
As the screen we'll be using will simply be passing in a set of touch points on each frame (as it's machine vision based), that's all I really want from the ipad. I don't need its gesture interpretation, as I'll be doing that on my end. I just need to get my java appl开发者_如何转开发ication to somehow get real time touch information from the ipad. I haven't had much luck googling solutions to this. Only thing relevant was the TouchPad app, but I think that's more directly interacting with the operating system, and wouldn't be giving me the data I need (although I'm going to buy it and experiment). Does anyone have a suggestion as to where I may start? Thanks!
Yes, you can develop everything in Java
and then expose the business logic
using a Web Service
, which you can then consume using wsdl2objc in your iPad
.
Then basically you will just call that Java
business logic on your callbacks
for the touches on the iPad.
You need to interface them using TCP/IP (or higher layers, e.g. HTTP), and ensure the machine running your Java program has IP connectivity over WLAN to your iPad.
So, you need to write a program running on the iPad that connects via TCP/IP to your Java program, and exchanges the information you need, such as passing the touch points over to your java program.
as a workaround you can use the following way
- Install WebORB for Java on your dev box.
- Create a simple rtmp application with your logic
- Download the WebORB for iOS RTMP Library and attach it to your project.
- Communicate with your server code through the RTMP protocol.
At this point the client library supports method invocation (client-server-client), data push ... Also with this workaround, you will have a persistent connection between the client and the server (I have no idea if it will be beneficial for your, but sounds awesome :) ). Moreover, it works really fast... Finally, for this case this approach is free - you can apply for the WebORB community license, or just use it in the development mode.
Examples http://www.themidnightcoders.com/products/weborb-for-mobile/ios-integration/rtmp-ios-examples-integration-between-java-net-and-ios.html
Documentation http://www.themidnightcoders.com/fileadmin/docs/ios/
Let me know if you need more information
Another option (to the web service) is to abstract the functionality away from the ipad to your computer, i.e. use it as a basic input device (multitouch mouse).
http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=use+iphone+as+a+pc+mouse#sclient=psy&hl=en&source=hp&q=use+ipad+as+a+pc+mouse
精彩评论