开发者

Stream realtime data from Android or iPhone JavaScript?

开发者 https://www.devze.com 2023-03-13 19:20 出处:网络
I would like to stream rea开发者_运维问答ltime accelerometer data from a smartphone (preferably iPhone or Android, but I\'m mostly platform agnostic) to a JavaScript app running in the client\'s brows

I would like to stream rea开发者_运维问答ltime accelerometer data from a smartphone (preferably iPhone or Android, but I'm mostly platform agnostic) to a JavaScript app running in the client's browser. I want to send updates as rapidly as the phone will give me readings from the device.

What is the best way to do this? Could I set up a web server on the phone, then connect to it from JavaScript with web sockets?


I believe the easiest way to achieve this is to use a cross-platform api such as phonegap. See the supported native feature list here: http://www.phonegap.com/about/features


Maybe it's to late :) but its for further searchs.

Did you have a look into this link: http://www.muzzley.com/documentation/components/motion-sensor.html

Basically what you just need to worry is to do your html/javascript app. The rest is already done :)

I hope it helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消