android leap motion,How to connect leap-motion , directly to android

问题

i am working on an android application that requires to be controlled by LEAP-motion.

the leap sdk currently only supports windows and mac.

but is there a way (any open library/tutorial etc.) to make the leap motion device talk to an android phone?

leap motion uses a USB connection to the phone , i have a usb OTG adapter and can directly plug in leap.

Any sort of help will be greatly appreciated.

回答1:

Introduction

Ya, I know your question contains the word "directly". My solution is not direct but it is an alternative you may consider. I have come up to a smooth acceptable solution to make LeapMotion work on Android (indirectly).

Pre-requisites

A PC or a Mac with npm as the "PROXY"

npm install binaryjs

npm install sleep

An Android device with Wi-fi capability ("DEVICE")

Leap Motion device ("LEAP MOTION") connected to the "PROXY"

Wi-fi LAN connection between the "DEVICE" and "PROXY"

The basic idea of this solution is to use the PROXY to make the impossible (Android+LeapMotion) to become possible. The PROXY will read the data from LEAP MOTION using the Javascript SDK and stream (ya, it's streaming rather than posting) the data to node.js instance running on it.

The DEVICE will connect to the PROXY and stream (ya, it's again streaming rather than polling) the hand position data and present it as a red circle on screen.

Step-by-step guide

Download the PROXY project here

Extract the project

Run in on your instance of node.js server on your PC or Mac (e.g. node index.js)

Mark down the IP of the PROXY

Open your browser (Chrome and Safari are proven working) and browse http://localhost:5000 to verify it is running

Download the Android project for your DEVICE here

Import the project in ADT

Open strings.xml to modify the IP address to the IP address of PROXY

Run the project on YOUR DEVICE

Move your hand above the LEAP MOTION and see the red circle moving according to your hand's direction

Direct connection

In fact I have tried to make the LEAP MOTION work directly on Android. There are certain difficulties. Firstly, the USB adapter of the Android device has to be USB host and providing sufficient power to LEAP MOTION. Then, if you could adb the Android device, you should be able to find /dev/video? after plugging in the cable. AFAIK, LEAP MOTION works like a video camera which streams video data to the other end of the cable (format unknown). But certainly, without an official SDK, we couldn't get the Hand, Bone, Gesture, Arm and other higher level API support. So, let's wait for SDK or use my indirect solution.

回答2:

Please go to the Leap Motion community. There is an Alpha SDK for Android but you need to request access so you can download the files and connect your LM directly to your Android device. I tested this and it works great. Orion is still not compatible with Android but they are working on it.

来源:https://stackoverflow.com/questions/24863925/how-to-connect-leap-motion-directly-to-android

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值