10 Intermediate Level Android Interview Question and Answer

Ranjeet Kumar yadav
2 min readJan 19, 2023

--

  1. How do you handle configuration changes in Android?

Handling configuration changes in Android can be done using the onSaveInstanceState() method to save the app’s state, and the onRestoreInstanceState() method to restore it, or by using the ViewModel and LiveData.

2. How do you handle multiple screen sizes and densities in Android? Handling multiple screen sizes and densities in Android can be done using the following methods:

  • Using different layout resources for different screen sizes and densities
  • Using the dp (density-independent pixel) unit for specifying dimensions
  • Using the sp (scale-independent pixel) unit for specifying font sizes

3. How do you handle runtime permissions in Android?

Handling runtime permissions in Android can be done by using the Android 6.0 (Marshmallow) runtime permission model, which requires the app to request permissions at runtime instead of during installation.

4. How do you implement push notifications in Android?

Implementing push notifications in Android can be done using Firebase Cloud Messaging (FCM) or other third-party libraries. This involves creating a Firebase project, configuring the app to receive FCM messages, and handling the messages in the app.

5.How do you implement offline caching in Android?

Implementing offline caching in Android can be done by using libraries such as Retrofit with OkHttp or Volley, which allow for caching network responses on the device.

6.How do you implement secure storage in Android?

Implementing secure storage in Android can be done by using the Android Keystore system, which allows for secure storage of cryptographic keys, or by using libraries such as SQL Cipher which encrypts the data stored in the SQLite database.

7.How do you optimize performance in Android?

Optimizing performance in Android can be done by reducing the number of objects created, reducing memory usage, and reducing the number of method calls.

8.How do you implement data binding in Android?

Implementing data binding in Android can be done by adding the “dataBinding” element to the app’s build.gradle file and using the <layout> tag in the layout xml files, this allows for bidirectional data binding between the UI elements and the data.

9.How do you implement a RESTful API client in Android?

Implementing a RESTful API client in Android can be done by using libraries such as Retrofit, which allows for easy creation of RESTful API clients by defining interfaces for the API endpoints.

10.How do you handle localization in Android?

Handling localization in Android can be done by creating different string resources for different languages, and providing alternative layouts and images for different regions.

These are some intermediate-level Android development questions that could be asked in an interview. It’s important to have a good understanding of the Android framework, and be familiar with best practices and patterns to perform well in the interview.

--

--