Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
39 views

How to get a list of footsteps on android?

I'm developing an Android smartphone app and need to get a list of timestamps of all footsteps the user did in the last X minutes. As precise as possible. What I want looks something like this: var ...
jackattack's user avatar
0 votes
0 answers
50 views

Read Data from external Sensors

I would like to create an android app which monitors the room temperature. Is it possible to connect a temperature sensor with cable (I do not want to be dependent on Wi-Fi and if possible not on ...
Arya's user avatar
  • 1
0 votes
0 answers
114 views

For the flutter sensor plus package can anyone tell me how the user acceleration is calculated or share the github link with for that respective file

For the flutter sensor plus package can anyone tell me how the user acceleration is calculated or share me the git-hub link with for that respective file I have been going through the github repo ...
rithvik36's user avatar
0 votes
0 answers
58 views

How to measure radiation(Non Ionizing) [Android SDK] for a Radiation measuring application

I need a way to measure the non-ionizing radiation around me through the smart phones. I have found several applications on the google Play Store which have an RF meter functionality which measures ...
SuhailHasan's user avatar
0 votes
0 answers
130 views

I can't get the ambient temperature on my phone

I am building an app which shoud display all the values from all the sensors including the TYPE_AMBIENT_TEMPERATURE sensor. I am using the SensorManager class. I have written the code and tested it on ...
electric_eel23's user avatar
0 votes
1 answer
252 views

sensor TYPE_STEP_DETECTOR is not working when screen is off

in my app i use the TYPE_STEP_DETECTOR. I want to detect steps when screen is off. But the sensor TYPE_STEP_DETECTOR does not work when the screen is off. So I use PowerManager/WakeLock to make the ...
miral's user avatar
  • 131
0 votes
0 answers
114 views

Unresolved reference: getSensorList in SensorManager.getSensorList

I am writing a simple code to find out all available sensors in an Android System. I don't know why I am getting this error. Neither Android docs have mentioned any exception as such that may occur ...
stardep's user avatar
  • 170
0 votes
1 answer
125 views

Does sampling rates of sensors change when update the API version on the same device?

As in the title, I am wondering whether the pre-defined sampling rates of sensors could change when I updated the android version on my device from API 26 to API 28, for example? In detail, assume I ...
Mohsen Ali's user avatar
0 votes
0 answers
122 views

Android: Sensor delay in SensorEventListener is working differently for different devices(from different manufacturers)

In Oppo mobile phone gyroscope is giving twice the accelerometer data(no of data per time period). In oneplus it is giving 5 times and in MI phone it perfectly giving the same no of data for both ...
R.Agarwal's user avatar
0 votes
1 answer
1k views

How is sensor refresh rate, limited on Android 12, related to security problems?

To protect potentially sensitive information about users, if your app targets Android 12 (API level 31) or higher, the system places a limit on the refresh rate of data from certain motion sensors and ...
heLomaN's user avatar
  • 1,784
0 votes
1 answer
122 views

Relay turn on by any of 3 touch sensors

I have a relay and i want to turn on the light with it and i have 2 touch sensors but with this code i can only turn it on with 1 how can i make it work? The third is a switch but it should still work ...
Filip GG's user avatar
0 votes
2 answers
3k views

Is there a conversion factor between Android sampling frequency (Hz) and sampling period (µs) (HIGH_SAMPLING_RATE_SENSORS)

I'm retrieving sensor data by using mSensorManager.registerListener(this, mLinearAccelerometer, SAMPLINGPERIOD) Android 12 introduced a rate-limitation on sensor data. If you call the registerListener(...
Patrick's user avatar
  • 194
1 vote
1 answer
100 views

Random gaps while recording data on Android smartwatch

I'm using a Fossil Gen 5 smartwatch running WearOS to record sensor data from Accelerometer, Gyroscope (32 Hz) and PPG sensor (64 Hz). I'm using a unique bufferedWriter object for each sensor to write ...
Gnyanesh Gandhe's user avatar
0 votes
2 answers
1k views

Add Custom sensor in AOSP

I want to add the LSM6DS3 sensor driver in my AOSP source code. I am using SC600T device. I have already add lsm6ds3 to the location /SC600T/SC60_SC600_Android9.0.0_kernel4.9_r029/kernel/msm-4.9/...
Aditya Oza's user avatar
2 votes
0 answers
187 views

How to get sensor and gnss data on Android with screen off?

I am developing an app that I want to use to collect Sensor/GNSS data for a database and future data science applications. I want to collect data for a longer period of time (at least an hour) and I ...
Tarnum's user avatar
  • 21
1 vote
0 answers
363 views

angle level calculate, android studio

Hi i'm creating a level tool on android studio and this is my code // More code goes here float[] rotationMatrix = new float[16]; SensorManager.getRotationMatrixFromVector( ...
fabio palladino's user avatar
6 votes
0 answers
370 views

iOS equivalent values of Android's Sensor.TYPE_ROTATION_VECTOR

I'm working on a cross-platform augmented-reality library, my Android code works great, but I'm having trouble with iOS. I'm using Android's TYPE_ROTATION_VECTOR sensor, which produces a SensorEvent. ...
hunter's user avatar
  • 931
0 votes
1 answer
219 views

onTrigger method of triggereventlistner is not called even after significant motion in android

An significant motion sensor is registered with triggereventlistener using requestTriggerSensor method of sensormanager. The onTrigger method of the triggereventlistener is called only once and after ...
gdinesh029's user avatar
0 votes
0 answers
225 views

Simple Fall Detect

I am trying to make an app for simple fall detect. I am trying something like below- @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ...
sKhanm's user avatar
  • 37
0 votes
0 answers
161 views

How to keep the device sensor awake?

Using sensors I am detecting motion for some calculations for which I register sensors on a Service. sensorManager.registerListener(sensorListener, sensorManager.getDefaultSensor(Sensor....
ItsVicky's user avatar
1 vote
1 answer
682 views

How to Animate Text from a Shake Event

I currently have an app that allows the user to shake the phone and different texts appear from an array. However, the text keeps displaying too fast, and if the user keeps shaking the phone, the text ...
greenTea's user avatar
0 votes
1 answer
567 views

Implementation of ROTATION VECTOR in Android

There is a rotation vector in Android. As per my understanding, this uses accelerometer and gyroscope for sensor fusion. There is one more fused sensor called geomagnetic rotation vector, which uses ...
Kaustav's user avatar
  • 751
1 vote
0 answers
321 views

How can i read data from pins of orange pi 4g iot and how can i write in "/system/bin/sh". how to fix "can't create pin: Read-only file system"

Orange pi 4g iot+ android 8.1= What about pins? i'm beginner in android, please help me to overcome this problem: i have orange pi 4g iot and Android 8.1 on it (from the http://www.orangepi.org/...
Alice In_the_hunterland's user avatar
1 vote
1 answer
1k views

Android - Measure distance from camera

This is my first question in SO so I'll accept all the critics to improve my question. I am developing an Android App that needs to measure the distance to an object from the camera ( external camera, ...
Gerard E's user avatar
-1 votes
1 answer
64 views

What are the common ways to test sensors working properly

I'm going to create an app which uses sensors in a smartphone. Before doing this job, I also want to test the sensors of the smartphone so that I can evaluate their correctness. What are the common ...
Khan9797's user avatar
  • 660
4 votes
1 answer
805 views

OnSensorChanged Being Called More Than Intended

I'm trying to develop an app that detects a fall and so far the accuracy of a fall is in an acceptable range but the problem is the "OnSensorChanged" gets invoked way too frequently causing the toast ...
Y. M's user avatar
  • 41
0 votes
0 answers
59 views

Transform acceleration from phone to car axis

Scenario: The user is placing his phone and attaching it directly to car. Let's say by using tape. ( it can be laying in whatever position user want ) The user is clicking Calibrate which stores the ...
Michał's user avatar
  • 626
0 votes
1 answer
128 views

Averaging sensor data over a small time period or just picking a few values in a small time period

I am working on an Android app that collect accelerometer data. It detects way too much data in the onSensorChanged() listener and I found out that you cannot really set a sampling rate (you can ...
anon_945500's user avatar
1 vote
0 answers
117 views

Android How to get amplitude for different frequencies with the help of SensorEvent

I want to calculate vibration while vehicle is moving. I am getting this data in onSensorChanged event. I need to calculate vibration for 12hz, 24hz and 36hz. @Override public void ...
Ammy Kang's user avatar
  • 12.5k
0 votes
1 answer
1k views

how to disable automatic magnetometer calibration?

There are plenty of threads about how to calibrate the compass sensor by rotating in all 3 axes and that you can only really know if it's out of calibration by checking against GPS data. Like: ...
Hamish_Fernsby's user avatar
0 votes
1 answer
105 views

Accelerometer and gyrometer readings relative to device orientation

I am working with the accelerometer and gyrometer readings on a mobile device and I want to get the readings relative to the device orientation. For what I will call orientation A the device is flat ...
Eric Cooper's user avatar
0 votes
1 answer
1k views

Detect device moving detail

I am doing a demo in which when I move device like on top-left, top-right,top-center and bottom-right, bottom-left, bottom-center, center-right, center-left this type of movement I need to detect so ...
Akshay More's user avatar
1 vote
1 answer
134 views

Smooth sensor data like in the cardboard app

I am wondering how the google cardboard (and all the other vr apps for android) manage to get an exact rotation angle of the device. The app follows my head very fast and precise. I already read about ...
fameman's user avatar
  • 3,819
3 votes
3 answers
4k views

get sensor data every 1/10th second

I am trying to log Android sensor data (Accelerometer, Gyro), every 1/10th of a second. Using the Android supplied values (AI, GAME, NORMAL), or user defined values (eg 100000 microseconds) makes ...
Geordie Wicks's user avatar
0 votes
2 answers
755 views

Possible to read sensor values of phone just by bluetooth?

When you connect bluetooth speakers or an external device you are connecting them using the Android/iPhones bluetooth settings. The android OS is doing this. Example:iPhone Bluetooth Menu These ...
Andrew Wilkins's user avatar
0 votes
1 answer
697 views

Heart rate monitor doesn't give feedback

I'm trying to get a display of the heart rate of the person wearing the smartwatch (LG Urbane). However the sensor never gives any feedback. I tried multiple solutions on stackoverflow, but none made ...
Lieven Luyckx's user avatar
1 vote
0 answers
350 views

Starting Android SensorEventListener On Button Click

I want Sensor listener to start getting information from the sensor on button click.But right now whenever my activity starts, the sensor event listener starts invoking sensor. In short I want to ...
Rezwan's user avatar
  • 1,225
0 votes
0 answers
59 views

Which Android sensors are redundant?

I'm recording the following sensor values from my tablet (given as constants of the Sensor class): TYPE_ACCELEROMETER TYPE_GRAVITY TYPE_GYROSCOPE TYPE_LIGHT TYPE_LINEAR_ACCELERATION ...
machinery's user avatar
  • 6,270
0 votes
1 answer
118 views

Using Sensor value in hashmap

I am new to Android. I am creating an application using magnetic sensor data. I am following source code of another program which is based on Wifi. My basic program is public class MainActivity ...
Bimal Bhattarai's user avatar
0 votes
0 answers
183 views

How to get values from Step Counter without any events?

I am writing an app and I need to get Step Counters value at the start of the app. I don't need to wait for the first step to be made. I want it right at the start. Is it possible to do it?
Vendetta8247's user avatar
0 votes
1 answer
144 views

Linear acceleration sensor values change drastically on tilt change but not on movement

My LinearAcceleration sensor is acting very weird. Even when I run, stop, run, walk,run,stop,walk... with my phone, sensor gives me very little reaction with below 0.1 values. But when I change my ...
Alpay Aydıngüler's user avatar
7 votes
1 answer
4k views

Android accelerometer calibration?

TL;DR How come the accelerometer values I get from Sensor.TYPE_ACCELEROMETER are slightly offset? I don't mean by gravity, but by some small error that varies from axis to axis and phone to phone. Can ...
Magnus's user avatar
  • 18.6k
1 vote
2 answers
668 views

How are Android sensor TYPE_LINEAR_ACCELERATION and TYPE_ROTATION_VECTOR implemented?

I have been searching for quiet some time for the algorithm used by the Android API to fuse raw data from different sensors to produce virtual sensors. How have they been implemented? Is the source ...
Sonakshi Mehra's user avatar
3 votes
1 answer
289 views

Why are Sensor values so different across devices?

I'm currently using android devices to develop an application that uses sensor values to get information about the environment. I'm using a Samsung S6 Edge and a Nexus 7 tablet and the sensor values i ...
Waddas's user avatar
  • 1,393
3 votes
1 answer
159 views

A generic sensor name

Is there a way to get a generic name of a sensor? At the moment my application lets the user select a sensor from a listview. Depending on the sensor the application should do various things. I've ...
Amar's user avatar
  • 529
-1 votes
1 answer
140 views

best practice in reading all sensors data

I'm new into android development, and at this stage I try to mimic some functionalities from other apps (please consider the image from bellow). For example, there is one app o google play which ...
dole doug's user avatar
  • 36k
0 votes
1 answer
74 views

Why some applications aren't compatible? (Android sensors)

Lately, I have been working with java, Android Studio and Android sensors in general. What I want to ask is why some applications which are using the so-called accelerometer are incompatible with my ...
Sinestro White's user avatar
-1 votes
3 answers
719 views

TYPE_LINEAR_ACCELERATION Sensor values changes according to smartphone brand - model

I published a game that uses motion sensors two days ago on Google Play Store. This game is a boxer game and allows users when they shake smartphone score will be evaluated automatically. To evaluate ...
user119949's user avatar
3 votes
0 answers
542 views

Detection of left or right turn of car using sensors(accelerometer or others)

Want to detect Is car take left turn or right turn on basis of azimuth,pitch and roll values calculated using sensors Will i able to calculate using these values or need other parameters too? Any ...
Damini's user avatar
  • 31
0 votes
1 answer
1k views

Android Sensor Hand Wave Detection

I'm trying to implement a sensor that can detect a hand wave. I found an example that can do hand hover, but not hand wave. The following code I used is from How to controlandroid proximity sensor? ...
Julia's user avatar
  • 1,389