Android interview questions

Android quiz questions

  • 1.

    What is a ContentProvider and what is it typically used for?

    Answer:

    ContentProvider manages access to a structured set of data. It encapsulates the data and provide mechanisms for defining data security. ContentProvider is the standard interface that connects data in one process with code running in another process.

    More information about content providers can be found here in the Android Developer’s Guide.

    View
  • 2.

    There are four Java classes related to the use of sensors on the Android platform. List them and explain the purpose of each.

    Answer:

    The four Java classes related to the use of sensors on the Android platform areL

    • Sensor: Provides methods to identify which capabilities are available for a specific sensor.
    • SensorManager: Provides methods for registering sensor event listeners and calibrating sensors.
    • SensorEvent: Provides raw sensor data, including information regarding accuracy.
    • SensorEventListener: Interface that defines callback methods that will receive sensor event notifications.

    To learn more about sensors, refer to Android developer’s guide.

    View

© 2017 QuizBucket.org