'How to run video recording while measuring sensor data Android App
I want to create an app that records a video while the accelerometer readings are below a certain threshold to indicate that the phone is not moving. I have been able to figure out the basics of how to create an app to record videos and record sensor data separately. But I want to do both of these simultaneously and make them dependent on each other so that the video recording stops when the accelerometer readings are too high. I am having trouble with how I can accomplish this basic task easily. I tried using Processing.org and Ketai library, but they don't seem to mention how to do video recordings.
Solution 1:[1]
Seems, like simple. You must make an adapter with SensorEventListener and attach the listener to the Activity in which you are making a video recording. Thus, when the accelerometer readings exceed the threshold, the sensor generates an event, and the Aactivity will be able to respond to it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Real VolAnd |
