Streaming data from a bluetooth Android device into Unity3D - java-native-interface

I am able to stream data into an Android App using Java and the Android Development Kit tools. I've started a project in Unity where I want to take that same stream of data and react to the values of the data within a Unity scene. The only solution that I've found is to create a Unity plugin: http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html
However, using a plugin is quite slow. I was wondering if there was another solution to stream data via bluetooth into a Unity scene on an Android device.

Related

How to test axis application on video files from the source?

I'm currently developing a computer-vision application for Axis camera. I have compiled the app and installed it to my device, but I can't find the way to test it.
I want to upload a video to my device's OS via app settings page or replace the video stream somehow to find out if the app works correctly or not. I don't know, maybe there is another approach to test the application (on axis device, not locally).
I will be very grateful if someone can help me with this issue.

Ionic app capable of creating a wifi hotspot and data transfer to the devices

I want to create a ionic 2 app, which should be able to create a wifi hotspot and transfer data to the devices which are connected to the hotspot.
Hotspot creation part is done.. But i don't know how to do the data transfer thing.
Any tutorials to follow?
Hosting a server from an Ionic app seems like a terrible idea. Are you trying to make a app that is a server?
But it seems there's a Cordova plugin for that. If you're really determined, maybe you can slot into that

WebRTC and gstreamer on linux device

I have small computer (something like Arduino or Raspberry pi) with Linux, camera and gstreamer installed on it.
I need to stream h264 video from this device to browser using WebRTC technology. Also, I use NodeJS as signaling server.
In simple words, I need to doing a WebRTC client from my device. What is the best way to do this? Can I use WebRTC Native API for this goal? How can I install it on my small device? Or, maybe, I just need to play with my gstreamer and install some webrtc plugins for it?
Since you will have to use a signalling server anyways, I would say you should use the Janus-Gateway. You mention CentOS for your signalling server, I am not 100% if it will run on CentOS specifically, but I have ran it successfully in Debian Jessie build with just a few dependency installations.
Janus handles the entire call set up with the gateway(signalling and everything). So, some port forwarding will probably have to be done so that the SDP exchange can occur(which you would have to worry about with any signalling server).
Install the gateway, there are a few dependencies but all were simple
installations
Take a look at the janus_streaming plugin. It has a gstreamer example that will stream from a gstreamer pipeline. Also, the streamingtest demo page to see how the Javascript API works for that plugin
The plugin listens on those ports given in the configuration file and will accept traffic from any IP address. So, I expect you can run a gstreamer pipeline on a different machine on the same network and send it to the plugin.
NOTE: You will have to modify the SDP that the JavaScipt sends to the gateway so that it includes H264(probably get rid of all other codecs as well just to force negotiation). You can do this by accessing the sdp through the jsep object passed to the success case for the createOffer function in the janus JavaScript API(jsep.sdp).
Another possibility for you is to use the Kurento Media Server (KMS), which has been written on top of GStreamer. I see two possibilities
You install KMS in a Ubuntu 14.04 box and bridge with your device, so that the device generates the video stream and sends it to the KMS box. From that, you can transcode it to VP9 and distribute it as a WebRTC stream quite easily using kurento client APIs (which may be used from Node.js). The application making the transcoding will require an RtpEndpoint (receiving video form the device in RTP/H.264) connected to a WebRtcEndpoint (capable of sending the video stream through WebRTC). This option is quite simple to implement because it's the standard way of using KMS. However, you will need to generate the RTP/H.264 stream on the device and appropriate SDP for it (this can be done using standard GStreamer elements)
You try to install KMS into your box directly. This might be more complex because it requires compiling KMS to the specific device, which may require some time investment. In addition, performing the transcoding in the device might be too expensive and you could starve its CPU.
Disclaimer: I'm member of the Kurento development team
You mentioned that you used a NodeJS signaling server. Recently Ericsson released an open source WebRTC gstreamer element: http://www.openwebrtc.io/, and along with their release they also published a WebRTC demo using node.js: http://demo.openwebrtc.io:38080/; the code here: https://github.com/EricssonResearch/openwebrtc-examples/tree/master/server.
For WebRTC for Raspberry Pi 2 you may want to consider UV4L. It allows you to stream live Audio & Video from the Rpi to any browser on a PC (HTML5).

How to access the accelerometer of a Windows Mobile device?

I've successfully ported my Qt-based C++ application to my girlfriend's Windows Mobile device. (A Samsung Omnia 2.)
However, it seems that the Qt Mobility Sensors API is not supported on Windows Mobile, so the application's specific features that would require the accelerometer are not working.
The question is, how to access the accelerometer of a Windows Mobile device from a C++ application?
If your Omnia 2 has WM 6.5 Update you may use the unified sensor API here

How to send stream data via Bluetooth from an iPhone/iPod Touch to a Windows C++ application?

I need to develop an iPhone/iPod Touch application that creates a server to send some data stream (characters or bytes) to a Windows C++ application via Bluetooth. I'm thinking of creating a TCP connection, but don't know where to start.
What iPhone API should I use do to something like this? Does anyone knows some code examples that i can use to do this?
And in Windows, what should I use to support this kind of communication?
Thanks
Yes. From what it looks like you can use the PAN bluetooth profile (the same profile used for tethering) with everything except the original iPhone.
Here's an article doing bluetooth over iPhone/iPad using GameKit. The article notes that you would need at least 2 iPhone/iPad devices running iPhone OS 3.0, but I wouldn't take that as an impossibility to talk to any other bluetooth capable device.
Update
This forum indicates that the iPhone is only capable of headset pairing. It could be that the iPhone is "picky" about what you can pair it with.
"The iPhone only recognizes the "headset" profile. Another well thought out idea from Apple. No A2DP profiles, no OBEX."
-sapporobaby
Update 2
As jamone as indicated iPhone 3.0 supports A2DP. How nice is that?
Here's a table listing of iPhone/iPad bluetooth supported profiles
I'm pretty sure third-party developers don't have sufficient access to the Bluetooth stack to do this via published APIs (i.e. via an app you publish to the App Store).
Is using WiFi an option? That's what most developers seem to be using for client/server communications. If that's the case, see if you can distribute Apple's Bonjour runtime with your app. If you search the developer site for Bonjour, they have code samples (though probably no Windows examples).