accelerometer

Android Accelerometer : onSensorChanged Runs Always

天大地大妈咪最大 提交于 2019-12-21 21:19:09
问题 I've written a method to send UDP messages over the network.It's working properly. After that, i tried to use the Accelerometer Sensor of my Galaxy S smartphone.I get the accelerometer values, show them in the screen. And when the values are changed(onSensorChanged method) , i send them using UDP to the application on my computer. The problem is that the program sends the sensor values always, not when they are changed. So, the onSensorChanged method is running always. I put my phone on the

How to send fake Accelerometer values to an app on a real device?

懵懂的女人 提交于 2019-12-21 12:22:15
问题 For example, Location Spoofer gives out a fake location by using the Access Mock Location permission and I can make my device send out a signal that it's present in any place that I desire. In the same way, can I fake the Accelerometer data to mock the various situations that a user can be in? Thanks in advance. 回答1: You can use SensorSimulator to simulate acceleration in your android device or emulator (download link). 回答2: As i answered in this question: Simulate accelerometer values on a

Accelerometer API for Laptops

一笑奈何 提交于 2019-12-21 09:03:56
问题 Most IBM (and some Dell) laptops have built-in accelerometers to stop any moving parts during a sudden fall, but I was unable to find a standardised Windows API to access this data. I assume that each manufacturer would provide a driver to interface with the sensor. Which popular laptop brands come standard with accelerometers accessible from an API and which libraries should I use to access the data? Does an API* exist to abstract away the differences between different manufacturers? I am

Accelerometer API for Laptops

可紊 提交于 2019-12-21 09:03:54
问题 Most IBM (and some Dell) laptops have built-in accelerometers to stop any moving parts during a sudden fall, but I was unable to find a standardised Windows API to access this data. I assume that each manufacturer would provide a driver to interface with the sensor. Which popular laptop brands come standard with accelerometers accessible from an API and which libraries should I use to access the data? Does an API* exist to abstract away the differences between different manufacturers? I am

accelerometer - Movement pattern recognition (iphone)

心不动则不痛 提交于 2019-12-21 05:15:40
问题 I have to find the best approach for tackling a problem for trying to recognize physical movements - with an iPhone in a pocket - like waling, stopping, turning left/right, sitting. I was thinking on just heuristically find the data corresponding to each action, then to check the incoming values against this data (with a threshold) and see what's happening. That's a very rough approach, of course, so maybe using something like the Support Vector Machine methods, but this seems too complicated

Get device plane relative to ground plane using accelerometer

好久不见. 提交于 2019-12-21 05:09:13
问题 Let's say the iPhone is placed on a flat table. I'd like to determine the angle of the tabletop plane, where an angle of 0 would mean the table is exactly perpendicular to the gravity vector. I'm using the following formula: radians = atanf (z / sqrt (x^2 + y^2) in the .h double accelerationXAverage; double accelerationYAverage; double accelerationZAverage; double accelerationXSum; double accelerationYSum; double accelerationZSum; int readingsCount; in the .m #define kThresholdMovementHigh 0

Detecting shaking in html5 mobile

流过昼夜 提交于 2019-12-21 04:57:06
问题 I'm building a web app in html5 at the moment that needs to be able to detect when the user shakes their phone and how fast they are shaking it. I've been browsing around but can't seem to find any examples of how I could implement this. I know html5 has an accelerometer that can detect the orientation of the phone, but how does it detect the speed at which the user is shaking it? Also I'm testing this on my iPhone, although ideally I would like it to work on Android devices too. Thoughts?

Android accelerometer, sensor usage and power consumption

倾然丶 夕夏残阳落幕 提交于 2019-12-21 04:27:12
问题 I have a quick question about the accelerometer in Android devices. Is it always on/active? Given that accelerometer is used to detect the orientation of the device, either landscape or portrait. In the official documentation ( SensorManager ) it states that sensors should be turned off to save power. But I wonder if this only applies to others sensors like magnetic field sensors, gyroscope, light sensor and so on. I need to make a case for power conservation and I don't want to make the

Pedometer in the Background

末鹿安然 提交于 2019-12-21 00:28:47
问题 I know this has been asked 1 million times but it has been just impossible to figure it out for me. So I need to build a pedometer app and have it continuing counting steps event if they send the app to de background for more than 10 minutes. The client wants not use use GPS at all, an also not play a silent audio because Apple may reject it. Does anyone one have and idea on how to do this? The client is taking Runtastic Pedometer app as Reference and I have been analysing it and it doesn't

Set iPhone accelerometer to ±8g mode

元气小坏坏 提交于 2019-12-20 11:09:49
问题 Is it possible to set iPhone accelerometer to receive data in the ±8g range? (as far as I know ST LIS331DLH accelerometer installed on iPhone supports this mode) We are looking not only into standard API, but also undocumented functions possible iOS hacks hardware tinkering Anyway to extend accelerometer range beyond standard ±2g 回答1: My "answer" doesn't contain direct answer to Evgeny's question. However I found a bunch of undocumented functions which probably can help. I have searched