android-sensors

Difference between Android SensorManager and Google Fit raw sensor data?

安稳与你 提交于 2021-02-19 03:53:10
问题 For my app I need to read the user's latest heart rate to send in every message. One is the Android SensorManager and the other is Google Fit's Sensors. Also there is Samsung's Health app (don't think this one will give me the data I need as I don't need past data unless I just query it for the latest heart rate). What is the difference between these methods of accessing the user's heart rate? Is one better than the other for my purposes? Or are they all the same? https://developer.android

Linear acceleration direction to track upward and downward movement of phone

雨燕双飞 提交于 2021-02-07 12:42:20
问题 I am trying to track the movement of the device only on the vertical direction, i.e. upward and downward movement. This should be irrespective of the orientation of the device. Things that i already know or have tried are these Linear acceleration is given by sensor TYPE_LINEAR_ACCELERATION and the axes is the phone axes and hence tracking any particular axes does not make a difference. I tried applying transpose or inverse of rotation vector( inverse or transpose for the rotation vector are

Linear acceleration direction to track upward and downward movement of phone

不问归期 提交于 2021-02-07 12:41:05
问题 I am trying to track the movement of the device only on the vertical direction, i.e. upward and downward movement. This should be irrespective of the orientation of the device. Things that i already know or have tried are these Linear acceleration is given by sensor TYPE_LINEAR_ACCELERATION and the axes is the phone axes and hence tracking any particular axes does not make a difference. I tried applying transpose or inverse of rotation vector( inverse or transpose for the rotation vector are

Android step counter

China☆狼群 提交于 2021-01-29 06:01:05
问题 I am trying to make a simple Android application to count steps. When I run the application the else is called in the onResume method meaning it did not find the sensor. I am testing on a 2016 Samsung J3 running Api 22. I am wondering is the problem in my code or is it that the phone does not have the sensor. If it is the phone is there a workaround for it? public class MainActivity extends AppCompatActivity implements SensorEventListener { private TextView counterTextView; private

Detect screen-touch instances in background on android

非 Y 不嫁゛ 提交于 2021-01-28 04:11:38
问题 I am currently working on a health-based project focusing on a person smartphone usage. And for that i want to monitor his touch-screen usage pattern i.e how long he has been pressing his hands on the screen. When this limit crosses a thresh-hold value will be generated warning to him. I need to know will i be able to track down a person screen-usage in background (i.e. while he uses all other apps in his phone) If so which functions would help me ?? 回答1: Android does not support this, for

BMP280 ServiceSpecificException: I/O error (code 5)

*爱你&永不变心* 提交于 2021-01-27 14:56:28
问题 I try to use AndroidThings to measure temperature with Raspberry Pi 3 and BMP280. 3,3V i have choosed because of specification of BMP280: To power the board, give it the same power as the logic level of your microcontroller Then i want to initialize sensor mTemperatureSensorDriver = new Bmx280SensorDriver("I2C1"); And by execution i receive following exeption Error configuring sensor com.google.android.things.pio.PioException: android.os.ServiceSpecificException: I/O error (code 5) at com

Android sampling rates variation of hardware Sensors on Nexus 6P

不羁岁月 提交于 2021-01-27 07:56:24
问题 I'm developing an Android app, for a research, and im reading several Sensor data like accelerometer, gyroscope, barometer etc. So I have 4 Nexus 6P devices all with the newest Factory Image and freshly set up with no other app installed than the standard once which are pre-installed. So the Problem that occurs now is that one of the phones is constantly lagging behind, so for example i record for half an hour the accelerometer at 105 Hz (so the max possible rate for the accelerometer is

Android accelerometer: SensorManager.DATA_X is deprecated - now what?

倖福魔咒の 提交于 2021-01-27 07:44:15
问题 I have written an accelerometer app (for learning purposes) using some of the suggestions from StackOverflow. Everything works fine but I get the "SensorManager.DATA_X is deprecated" message as a warning in my code: // setup the textviews for displaying the accelerations mAccValueViews[SensorManager.DATA_X] = (TextView) findViewById(R.id.accele_x_value); mAccValueViews[SensorManager.DATA_Y] = (TextView) findViewById(R.id.accele_y_value); mAccValueViews[SensorManager.DATA_Z] = (TextView)

Android accelerometer: SensorManager.DATA_X is deprecated - now what?

余生颓废 提交于 2021-01-27 07:43:24
问题 I have written an accelerometer app (for learning purposes) using some of the suggestions from StackOverflow. Everything works fine but I get the "SensorManager.DATA_X is deprecated" message as a warning in my code: // setup the textviews for displaying the accelerations mAccValueViews[SensorManager.DATA_X] = (TextView) findViewById(R.id.accele_x_value); mAccValueViews[SensorManager.DATA_Y] = (TextView) findViewById(R.id.accele_y_value); mAccValueViews[SensorManager.DATA_Z] = (TextView)

Activity Recognition API unreliable?

旧巷老猫 提交于 2021-01-27 04:12:06
问题 I'm trying to use the activity recognition in a project to detect when the user is "IN-VEHICLE".(Driving) The problem is that it is almost impossibly to use it, as mostProbableActivity often report "IN-VEHICLE" even though I've been sitting at my desk for a long time or just walking around in my house. It would be very nice to know how the API conclude this. I think this feature has great potential, but as now something is clearly not working. This is a log of MostProbableActivity taken every