Interview Questions

The following questions are provided to help you solidify your understanding of this topic area:

  1. True or false. There is one sensor framework for all sensors in Android, from light sensor to GPS sensor to NFC sensor.
  2. Which sensors can be emulated in the Android emulator?
  3. What mechanism should you use in AndroidManifest.xml to ensure that your application is only installed on devices that have the sensors you need?
  4. Is it possible to directly read sensor values anytime you want? Why or why not?
  5. Why is it a bad idea to clone the sensor event values array that’s passed to the sensor callback method?
  6. What’s dangerous about using a constant like LIGHT_SUNLIGHT_MAX to tell when the device is outside?
  7. Accelerometers are fixed to ...

Get Pro Android 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.