简体   繁体   中英

When a phone call comes , does the accelerometer stops reading in Android phones?

I am developing an app which writes accelerometer reading in a file every second. My android phone does not has a service provider so I cant check it.

When a call comes, will the accelerometer stop recording ??

Not if it's running in a Service or on a AsyncTask . When you are running the accelerometer on the UI Thread it will be stopped by the Activity s onPause() method but if you run it on a different thread it will not stop.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM