Introduction
Android, Google’s open-source platform, powers billions of devices and remains a cornerstone of mobile app development. Mastering Android development is essential for roles like Android Developer, Mobile Engineer, or App Architect in 2025. This blog presents 150+ meticulously curated interview questions on Android Mobile App Development, categorized by complexity (Beginner, Intermediate, Expert). These questions are competitive, real-life centric, scenario-based, and include coding examples, IQ challenges, and data-oriented problems to prepare you for exams and real-world applications. Optimized for SEO and designed for all readers, this guide includes detailed explanations and practical examples for clarity. Dive into the ultimate Android interview prep guide for 2025!
Table of Contents
Beginner-Level Questions
Intermediate-Level Questions
Expert-Level Questions
Conclusion
Beginner-Level Questions
These questions cover foundational Android concepts, Kotlin/Java basics, and core principles for entry-level candidates.
Android Mobile App Development (Beginner)
What is Android, and why is it used for mobile app development?
Type: Basic Understanding
Expected Answer: Android is Google’s open-source OS for mobile devices, offering flexibility and a large ecosystem.
Example: Apps like Gmail use Android SDK for development.
What is the Android SDK, and what are its key components?
Type: Conceptual
Expected Answer: The Android SDK provides tools and APIs for app development, including libraries, emulator, and ADB.
What is an Activity in Android?
Type: Basic Understanding
Expected Answer: An Activity represents a single screen with a user interface.
Example:
class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) } }
What is the role of the AndroidManifest.xml file?
Type: Conceptual
Expected Answer: Declares app components, permissions, and metadata.
Example:
<activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
What is the difference between a Fragment and an Activity?
Type: Conceptual
Expected Answer: An Activity is a full screen, while a Fragment is a modular UI component within an Activity.
What is Kotlin, and why is it preferred for Android development?
Type: Basic Understanding
Expected Answer: Kotlin is a modern, concise language with null safety, endorsed by Google for Android.
What is the purpose of the res folder in an Android project?
Type: Conceptual
Expected Answer: The res folder stores resources like layouts, drawables, and strings.
Example:
<string name="app_name">MyApp</string>
What is an Intent in Android?
Type: Basic Understanding
Expected Answer: Intents facilitate communication between components, like starting an Activity.
Example:
val intent = Intent(this, SecondActivity::class.java) startActivity(intent)
What is the role of the build.gradle file?
Type: Conceptual
Expected Answer: Configures app dependencies, build types, and SDK versions.
Example:
dependencies { implementation 'androidx.core:core-ktx:1.12.0' }
What is the Android Activity lifecycle?
Type: Conceptual
Expected Answer: Includes onCreate, onStart, onResume, onPause, onStop, onDestroy.
What is a View in Android?
Type: Basic Understanding
Expected Answer: A View is a UI element like a button or text field.
Example:
<Button android:id="@+id/myButton" android:text="Click Me" />
What is the difference between dp, sp, and px in Android?
Type: Conceptual
Expected Answer: dp is density-independent, sp is for fonts, px is raw pixels.
What is the purpose of the RecyclerView in Android?
Type: Basic Understanding
Expected Answer: RecyclerView displays large lists efficiently with view recycling.
Example:
<androidx.recyclerview.widget.RecyclerView android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="match_parent" />
What is the role of the onCreate method in an Activity?
Type: Conceptual
Expected Answer: Initializes the Activity, sets the layout, and binds views.
Example:
override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) }
What is the difference between LinearLayout and ConstraintLayout?
Type: Conceptual
Expected Answer: LinearLayout arranges views linearly, ConstraintLayout uses constraints for flexibility.
What is the purpose of the R class in Android?
Type: Basic Understanding
Expected Answer: The R class provides access to resources like layouts and strings.
Example:
setContentView(R.layout.activity_main)
What is an Android Service?
Type: Conceptual
Expected Answer: A Service runs background tasks without a UI.
Example:
class MyService : Service() { override fun onBind(intent: Intent?): IBinder? = null }
What is the role of SharedPreferences in Android?
Type: Basic Understanding
Expected Answer: Stores small key-value pairs for app settings.
Example:
val prefs = getSharedPreferences("myPrefs", MODE_PRIVATE) prefs.edit().putString("key", "value").apply()
What is the difference between startActivity and startActivityForResult?
Type: Conceptual
Expected Answer: startActivityForResult expects a result from the launched Activity.
What is the purpose of the minSdkVersion in build.gradle?
Type: Conceptual
Expected Answer: Specifies the minimum Android version the app supports.
Intermediate-Level Questions
These questions target candidates with 2–5 years of experience, focusing on practical scenarios, architecture, and advanced Android features.
Android Mobile App Development (Intermediate)
How do you implement a RecyclerView in Android?
Type: Coding Challenge
Expected Answer:
class MyAdapter(val items: List<String>) : RecyclerView.Adapter<MyViewHolder>() { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder { val view = LayoutInflater.from(parent.context).inflate(R.layout.item_layout, parent, false) return MyViewHolder(view) } override fun onBindViewHolder(holder: MyViewHolder, position: Int) { holder.bind(items[position]) } override fun getItemCount(): Int = items.size } class MyViewHolder(view: View) : RecyclerView.ViewHolder(view) { fun bind(item: String) { itemView.findViewById<TextView>(R.id.textView).text = item } }
What is the MVVM architecture, and how is it implemented in Android?
Type: Conceptual
Expected Answer: MVVM separates UI, logic, and data using ViewModel and LiveData.
Example:
class MyViewModel : ViewModel() { private val _data = MutableLiveData<String>() val data: LiveData<String> = _data fun updateData(value: String) { _data.value = value } }
How do you handle HTTP requests in Android?
Type: Practical
Expected Answer: Use Retrofit or OkHttp for API calls.
Example:
interface ApiService { @GET("data") suspend fun getData(): Response<Data> } val retrofit = Retrofit.Builder().baseUrl("https://api.example.com").build()
What is the role of LiveData in Android?
Type: Conceptual
Expected Answer: LiveData is an observable data holder for lifecycle-aware updates.
Example:
val data: LiveData<String> = MutableLiveData("Hello")
How do you implement navigation in Android using Jetpack Navigation?
Type: Practical
Expected Answer: Use NavGraph and NavController for navigation.
Example:
<navigation android:id="@+id/nav_graph"> <fragment android:id="@+id/firstFragment" android:name=".FirstFragment"> <action android:id="@+id/action_to_second" destination="@id/secondFragment" /> </fragment> </navigation>
What is the difference between Coroutines and RxJava in Android?
Type: Conceptual
Expected Answer: Coroutines are simpler and native to Kotlin, RxJava is for reactive programming.
How do you handle background tasks in Android?
Type: Scenario-Based
Expected Answer: Use WorkManager for persistent tasks.
Example:
val workRequest = OneTimeWorkRequestBuilder<MyWorker>().build() WorkManager.getInstance(context).enqueue(workRequest)
What is the role of Room in Android?
Type: Conceptual
Expected Answer: Room is a persistence library for SQLite database access.
Example:
@Entity data class User(@PrimaryKey val id: Int, val name: String) @Dao interface UserDao { @Query("SELECT * FROM user") fun getAll(): List<User> }
How do you implement dependency injection in Android?
Type: Practical
Expected Answer: Use Dagger or Hilt for dependency injection.
Example:
@Module @InstallIn(SingletonComponent::class) object AppModule { @Provides fun provideApiService(): ApiService = Retrofit.Builder().build().create(ApiService::class.java) }
What is the difference between Service and IntentService?
Type: Conceptual
Expected Answer: IntentService handles intents sequentially on a worker thread.
How do you implement a ViewModel in Android?
Type: Coding Challenge
Expected Answer:
class MyViewModel : ViewModel() { private val _counter = MutableLiveData<Int>(0) val counter: LiveData<Int> = _counter fun increment() { _counter.value = (_counter.value ?: 0) + 1 } }
What is the role of the onSaveInstanceState method?
Type: Conceptual
Expected Answer: Saves UI state during configuration changes.
Example:
override fun onSaveInstanceState(outState: Bundle) { outState.putInt("counter", counter) super.onSaveInstanceState(outState) }
How do you handle permissions in Android?
Type: Practical
Expected Answer: Use ActivityCompat for runtime permissions.
Example:
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.CAMERA), 1)
What is the difference between ViewBinding and findViewById?
Type: Conceptual
Expected Answer: ViewBinding generates type-safe binding classes, reducing boilerplate.
How do you implement a custom view in Android?
Type: Coding Challenge
Expected Answer:
class CustomView(context: Context) : View(context) { override fun onDraw(canvas: Canvas) { canvas.drawCircle(50f, 50f, 30f, Paint()) } }
What is the role of the BroadcastReceiver in Android?
Type: Conceptual
Expected Answer: Receives system or app broadcasts for event handling.
Example:
class MyReceiver : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { Log.d("Receiver", "Broadcast received") } }
How do you handle configuration changes in Android?
Type: Scenario-Based
Expected Answer: Use ViewModel or onSaveInstanceState.
Example:
val viewModel: MyViewModel by viewModels()
What is the difference between AsyncTask and Coroutines?
Type: Conceptual
Expected Answer: AsyncTask is deprecated, Coroutines are modern and lightweight.
How do you implement a notification in Android?
Type: Practical
Expected Answer: Use NotificationCompat for notifications.
Example:
NotificationCompat.Builder(context, "channel_id") .setContentTitle("Title") .setContentText("Text") .build()
What is the role of the gradle.properties file?
Type: Conceptual
Expected Answer: Stores global build configurations like JVM settings.
Expert-Level Questions
These questions challenge senior developers with complex scenarios, advanced Android features, and performance optimization.
Android Mobile App Development (Expert)
How do you optimize Android app performance?
Type: Scenario-Based
Expected Answer: Minimize overdraw, use ViewHolder pattern, and profile with Android Studio.
Example:
recyclerView.setHasFixedSize(true)
What is Jetpack Compose, and how does it differ from XML layouts?
Type: Conceptual
Expected Answer: Jetpack Compose is a declarative UI toolkit, replacing XML with Kotlin code.
Example:
@Composable fun Greeting(name: String) { Text(text = "Hello $name!") }
How do you implement a custom WorkManager worker?
Type: Coding Challenge
Expected Answer:
class MyWorker(context: Context, params: WorkerParameters) : Worker(context, params) { override fun doWork(): Result { return Result.success() } }
What is the difference between ViewModel and SavedStateHandle?
Type: Conceptual
Expected Answer: SavedStateHandle persists data across process death.
How do you implement dependency injection with Hilt?
Type: Practical
Expected Answer: Use @Inject and @HiltAndroidApp.
Example:
@HiltAndroidApp class MyApp : Application()
What is the role of the Room database migrations?
Type: Conceptual
Expected Answer: Migrations update schema changes without data loss.
Example:
val MIGRATION_1_2 = object : Migration(1, 2) { override fun migrate(database: SupportSQLiteDatabase) { database.execSQL("ALTER TABLE user ADD COLUMN age INTEGER") } }
How do you handle deep links in Android?
Type: Scenario-Based
Expected Answer: Use nav_deep_link in NavGraph or Intent filters.
Example:
<nav-graph android:value="@navigation/nav_graph"> <deepLink android:uri="example://app/profile/{id}" /> </nav-graph>
What is the difference between Flow and LiveData?
Type: Conceptual
Expected Answer: Flow is a Kotlin reactive stream, LiveData is lifecycle-aware.
How do you implement a foreground service in Android?
Type: Practical
Expected Answer: Use startForeground with a notification.
Example:
class MyService : Service() { override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { startForeground(1, Notification()) return START_STICKY } }
What is the role of the LeakCanary library?
Type: Conceptual
Expected Answer: Detects memory leaks in Android apps.
How do you implement Jetpack Compose animations?
Type: Coding Challenge
Expected Answer:
@Composable fun AnimatedBox() { var expanded by remember { mutableStateOf(false) } Box( modifier = Modifier.animateContentSize().background(if (expanded) Color.Blue else Color.Red) ) }
What is the difference between Coroutines and Thread?
Type: Conceptual
Expected Answer: Coroutines are lightweight and managed, Threads are OS-level.
How do you handle push notifications in Android?
Type: Scenario-Based
Expected Answer: Use Firebase Cloud Messaging (FCM).
Example:
class MyMessagingService : FirebaseMessagingService() { override fun onMessageReceived(message: RemoteMessage) { showNotification(message.notification?.body) } }
What is the role of the Android Jetpack libraries?
Type: Conceptual
Expected Answer: Jetpack provides standardized APIs for UI, data, and architecture.
How do you implement a custom ViewModel factory?
Type: Coding Challenge
Expected Answer:
class MyViewModelFactory : ViewModelProvider.Factory { override fun <T : ViewModel> create(modelClass: Class<T>): T { return MyViewModel() as T } }
What is the difference between Activity and AppCompatActivity?
Type: Conceptual
Expected Answer: AppCompatActivity supports backward-compatible features.
How do you optimize RecyclerView performance?
Type: Scenario-Based
Expected Answer: Use DiffUtil and ViewHolder pattern.
Example:
class MyDiffCallback : DiffUtil.ItemCallback<String>() { override fun areItemsTheSame(oldItem: String, newItem: String): Boolean = oldItem == newItem override fun areContentsTheSame(oldItem: String, newItem: String): Boolean = oldItem == newItem }
What is the role of the adb tool in Android development?
Type: Conceptual
Expected Answer: ADB facilitates device communication for debugging.
How do you implement biometric authentication in Android?
Type: Practical
Expected Answer: Use BiometricPrompt API.
Example:
val prompt = BiometricPrompt(this, executor, object : BiometricPrompt.AuthenticationCallback() { override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) { // Success } })
What is the difference between startService and bindService?
Type: Conceptual
Expected Answer: startService runs indefinitely, bindService allows interaction.
How do you implement a custom layout manager for RecyclerView?
Type: Coding Challenge
Expected Answer:
class CustomLayoutManager : RecyclerView.LayoutManager() { override fun generateDefaultLayoutParams(): RecyclerView.LayoutParams { return RecyclerView.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT) } }
What is the role of the Gradle build system in Android?
Type: Conceptual
Expected Answer: Automates and manages the build process.
How do you handle memory leaks in Android?
Type: Scenario-Based
Expected Answer: Use LeakCanary and avoid static references.
Example:
LeakCanary.install(application)
What is the difference between Room and SQLiteOpenHelper?
Type: Conceptual
Expected Answer: Room is a higher-level abstraction with type safety.
How do you implement a custom broadcast receiver?
Type: Practical
Expected Answer:
val receiver = object : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { Log.d("Receiver", "Action: ${intent.action}") } } registerReceiver(receiver, IntentFilter("my_action"))
What is the role of the Data Binding library?
Type: Conceptual
Expected Answer: Binds UI components to data sources.
Example:
<layout> <data> <variable name="user" type="com.example.User" /> </data> <TextView android:text="@{user.name}" /> </layout>
How do you implement dynamic feature modules in Android?
Type: Scenario-Based
Expected Answer: Use Play Feature Delivery for on-demand modules.
Example:
dynamicFeatures = [":dynamic_feature"]
What is the difference between Hilt and Dagger?
Type: Conceptual
Expected Answer: Hilt simplifies Dagger with predefined components.
How do you implement a custom notification channel?
Type: Practical
Expected Answer:
val channel = NotificationChannel("id", "name", NotificationManager.IMPORTANCE_DEFAULT) getSystemService(NotificationManager::class.java).createNotificationChannel(channel)
What is the role of the StrictMode class?
Type: Conceptual
Expected Answer: Detects policy violations like disk I/O on the main thread.
How do you implement Jetpack Compose navigation?
Type: Coding Challenge
Expected Answer:
val navController = rememberNavController() NavHost(navController, startDestination = "home") { composable("home") { Text("Home") } composable("profile") { Text("Profile") } }
What is the difference between LiveData and StateFlow?
Type: Conceptual
Expected Answer: StateFlow is a Kotlin Flow with state management.
How do you handle app updates in Android?
Type: Scenario-Based
Expected Answer: Use Play In-App Updates API.
Example:
val appUpdateManager = AppUpdateManagerFactory.create(context) appUpdateManager.startUpdateFlowForResult(appUpdateInfo, AppUpdateType.IMMEDIATE, this, 1)
What is the role of the Android Profiler?
Type: Conceptual
Expected Answer: Monitors CPU, memory, and network usage.
How do you implement a custom ContentProvider?
Type: Coding Challenge
Expected Answer:
class MyProvider : ContentProvider() { override fun query(uri: Uri, projection: Array<String>?, selection: String?, args: Array<String>?, sortOrder: String?): Cursor? { return null } }
What is the difference between Service and JobScheduler?
Type: Conceptual
Expected Answer: JobScheduler schedules tasks with system constraints.
How do you implement accessibility in Android?
Type: Practical
Expected Answer: Use contentDescription and TalkBack support.
Example:
<ImageView android:contentDescription="Profile picture" />
What is the role of the buildTypes in build.gradle?
Type: Conceptual
Expected Answer: Defines build configurations like debug and release.
How do you handle large dataset pagination in Android?
Type: Scenario-Based
Expected Answer: Use Paging library for efficient data loading.
Example:
val pagingConfig = PagingConfig(pageSize = 20) val pager = Pager(pagingConfig) { MyPagingSource() }
What is the difference between Room and Realm?
Type: Conceptual
Expected Answer: Room integrates with SQLite, Realm is a standalone database.
How do you implement a custom animation in Android?
Type: Coding Challenge
Expected Answer:
val animator = ObjectAnimator.ofFloat(view, "translationX", 100f) animator.start()
What is the role of the Android Architecture Components?
Type: Conceptual
Expected Answer: Provides libraries for lifecycle, data, and UI management.
How do you handle security in Android apps?
Type: Scenario-Based
Expected Answer: Use ProGuard, HTTPS, and secure storage.
Example:
buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }
What is the difference between Activity and Fragment lifecycle?
Type: Conceptual
Expected Answer: Fragment lifecycle includes onAttach and onCreateView.
How do you implement a custom dialog in Android?
Type: Coding Challenge
Expected Answer:
AlertDialog.Builder(this) .setTitle("Custom Dialog") .setMessage("Content") .setPositiveButton("OK") { _, _ -> } .show()
What is the role of the adb shell command?
Type: Conceptual
Expected Answer: Provides access to device shell for debugging.
How do you implement a custom splash screen in Android?
Type: Practical
Expected Answer: Use SplashScreen API or a custom Activity.
Example:
<style name="SplashTheme" parent="Theme.SplashScreen"> <item name="postSplashScreenTheme">@style/AppTheme</item> </style>
What is the difference between DataStore and SharedPreferences?
Type: Conceptual
Expected Answer: DataStore supports complex data and coroutines.
How do you implement a background fetch in Android?
Type: Practical
Expected Answer: Use WorkManager with periodic tasks.
Example:
val request = PeriodicWorkRequestBuilder<MyWorker>(15, TimeUnit.MINUTES).build() WorkManager.getInstance(context).enqueue(request)
What is the role of the Android Emulator?
Type: Conceptual
Expected Answer: Simulates Android devices for testing.
How do you implement a custom bottom navigation in Android?
Type: Coding Challenge
Expected Answer:
BottomNavigationView().apply { setupWithNavController(findNavController(R.id.nav_host_fragment)) }
What is the difference between onPause and onStop?
Type: Conceptual
Expected Answer: onPause is called when partially visible, onStop when not visible.
How do you handle app versioning in Android?
Type: Practical
Expected Answer: Use versionCode and versionName in build.gradle.
Example:
android { defaultConfig { versionCode 1 versionName "1.0" } }
What is the role of the ConstraintLayout in Android?
Type: Conceptual
Expected Answer: Provides flexible layout with constraints.
How do you implement a custom tab layout in Android?
Type: Coding Challenge
Expected Answer:
TabLayout().apply { addTab(newTab().setText("Tab 1")) setupWithViewPager(viewPager) }
What is the difference between Activity and Service lifecycle?
Type: Conceptual
Expected Answer: Service lacks UI-related lifecycle methods.
How do you handle large file downloads in Android?
Type: Scenario-Based
Expected Answer: Use DownloadManager or OkHttp with progress tracking.
Example:
val request = DownloadManager.Request(Uri.parse("https://example.com/file")) DownloadManager(context).enqueue(request)
What is the role of the Android Debug Bridge (ADB)?
Type: Conceptual
Expected Answer: Connects to devices for debugging and file transfer.
How do you implement a custom back press handler in Android?
Type: Practical
Expected Answer:
override fun onBackPressed() { if (condition) { // Custom logic } else { super.onBackPressed() } }
What is the difference between ViewModel and AndroidViewModel?
Type: Conceptual
Expected Answer: AndroidViewModel provides application context.
How do you implement a custom ViewGroup in Android?
Type: Coding Challenge
Expected Answer:
class CustomViewGroup(context: Context) : ViewGroup(context) { override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) { // Layout logic } }
What is the role of the ProGuard in Android?
Type: Conceptual
Expected Answer: Shrinks and obfuscates code for optimization.
How do you handle app crashes in Android?
Type: Scenario-Based
Expected Answer: Use Crashlytics or custom exception handling.
Example:
Thread.setDefaultUncaughtExceptionHandler { _, e -> Log.e("Crash", "Uncaught: $e") }
What is the difference between Flow and Channel in Kotlin?
Type: Conceptual
Expected Answer: Flow is for cold streams, Channel for hot streams.
How do you implement a custom loader in Android?
Type: Coding Challenge
Expected Answer:
ProgressDialog(this).apply { setMessage("Loading...") show() }
What is the role of the Android Jetpack Navigation library?
Type: Conceptual
Expected Answer: Simplifies navigation with NavGraph and NavController.
How do you handle multi-threading in Android?
Type: Scenario-Based
Expected Answer: Use Coroutines or ThreadPoolExecutor.
Example:
CoroutineScope(Dispatchers.IO).launch { // Background task }
What is the difference between Room migrations and schema export?
Type: Conceptual
Expected Answer: Migrations update schema, export generates schema files.
How do you implement a custom snackbar in Android?
Type: Practical
Expected Answer:
Snackbar.make(view, "Message", Snackbar.LENGTH_SHORT).show()
What is the role of the R8 compiler?
Type: Conceptual
Expected Answer: Replaces ProGuard for code shrinking and optimization.
How do you implement a custom transition animation in Android?
Type: Coding Challenge
Expected Answer:
val transition = Slide() TransitionManager.beginDelayedTransition(viewGroup, transition)
What is the difference between onCreate and onStart?
Type: Conceptual
Expected Answer: onCreate initializes, onStart makes the Activity visible.
How do you handle localization in Android?
Type: Practical
Expected Answer: Use resource files for different locales.
Example:
<string name="hello" lang="es">Hola</string>
What is the role of the Android Studio Layout Inspector?
Type: Conceptual
Expected Answer: Visualizes view hierarchy for debugging.
How do you implement a custom dialog fragment?
Type: Coding Challenge
Expected Answer:
class MyDialogFragment : DialogFragment() { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { return AlertDialog.Builder(requireContext()) .setTitle("Dialog") .setMessage("Content") .create() } }
What is the difference between startActivity and startActivityForResult?
Type: Conceptual
Expected Answer: startActivityForResult expects a result, deprecated in favor of Activity Result API.
How do you handle large-scale data syncing in Android?
Type: Scenario-Based
Expected Answer: Use WorkManager with SyncAdapter.
Example:
WorkManager.getInstance(context).enqueueUniquePeriodicWork("sync", ExistingPeriodicWorkPolicy.KEEP, workRequest)
What is the role of the Android Asset Packaging Tool (AAPT)?
Type: Conceptual
Expected Answer: Packages resources into APK.
How do you implement a custom toolbar in Android?
Type: Practical
Expected Answer:
<androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" />
setSupportActionBar(findViewById(R.id.toolbar))
What is the difference between Activity Result API and startActivityForResult?
Type: Conceptual
Expected Answer: Activity Result API is modern and type-safe.
How do you implement a custom bottom sheet in Android?
Type: Coding Challenge
Expected Answer:
BottomSheetDialog(this).apply { setContentView(R.layout.bottom_sheet_layout) show() }
What is the role of the Android Gradle Plugin?
Type: Conceptual
Expected Answer: Integrates Gradle with Android build system.
How do you handle orientation changes in Android?
Type: Scenario-Based
Expected Answer: Use onConfigurationChanged or ViewModel.
Example:
override fun onConfigurationChanged(newConfig: Configuration) { super.onConfigurationChanged(newConfig) }
What is the difference between Fragment and DialogFragment?
Type: Conceptual
Expected Answer: DialogFragment displays a dialog with Fragment lifecycle.
How do you implement a custom ViewPager in Android?
Type: Coding Challenge
Expected Answer:
ViewPager2().apply { adapter = MyPagerAdapter(this@MainActivity) }
What is the role of the Android Studio Profiler?
Type: Conceptual
Expected Answer: Analyzes app performance metrics.
How do you implement a custom notification action?
Type: Practical
Expected Answer:
NotificationCompat.Builder(context, "channel_id") .addAction(R.drawable.ic_action, "Action", pendingIntent) .build()
What is the difference between Room and GreenDAO?
Type: Conceptual
Expected Answer: Room is Jetpack-based, GreenDAO is lightweight.
How do you handle app signing in Android?
Type: Practical
Expected Answer: Use keytool and jarsigner or Play App Signing.
Example:
keytool -genkey -v -keystore my-key.keystore -alias alias_name
What is the role of the Android Virtual Device (AVD)?
Type: Conceptual
Expected Answer: Simulates Android devices for testing.
How do you implement a custom search view in Android?
Type: Coding Challenge
Expected Answer:
SearchView().setOnQueryTextListener(object : SearchView.OnQueryTextListener { override fun onQueryTextSubmit(query: String?): Boolean { return true } override fun onQueryTextChange(newText: String?): Boolean { return true } })
What is the difference between onResume and onStart?
Type: Conceptual
Expected Answer: onResume is called when Activity is interactive.
How do you handle offline data in Android?
Type: Scenario-Based
Expected Answer: Use Room or WorkManager for offline caching.
Example:
@Query("SELECT * FROM user WHERE offline = 1") fun getOfflineUsers(): List<User>
What is the role of the Android Support Library?
Type: Conceptual
Expected Answer: Provides backward-compatible APIs, replaced by AndroidX.
How do you implement a custom floating action button?
Type: Coding Challenge
Expected Answer:
<com.google.android.material.floatingactionbutton.FloatingActionButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_add" />
What is the difference between LiveData and MediatorLiveData?
Type: Conceptual
Expected Answer: MediatorLiveData combines multiple LiveData sources.
How do you implement a custom progress bar in Android?
Type: Practical
Expected Answer:
<ProgressBar android:layout_width="wrap_content" android:layout_height="wrap_content" style="?android:attr/progressBarStyleHorizontal" />
What is the role of the Android Studio Build Analyzer?
Type: Conceptual
Expected Answer: Identifies build bottlenecks.
How do you implement a custom recycler view adapter with multiple view types?
Type: Coding Challenge
Expected Answer:
class MultiTypeAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>() { override fun getItemViewType(position: Int): Int = if (position % 2 == 0) 1 else 2 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { return if (viewType == 1) ViewHolder1() else ViewHolder2() } }
What is the difference between Activity and Application context?
Type: Conceptual
Expected Answer: Application context is app-wide, Activity context is UI-specific.
How do you implement a custom app widget in Android?
Type: Practical
Expected Answer:
class MyAppWidget : AppWidgetProvider() { override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) { // Update widget } }
What is the role of the Android Gradle Sync?
Type: Conceptual
Expected Answer: Synchronizes project with Gradle configuration.
How do you handle background location updates in Android?
Type: Scenario-Based
Expected Answer: Use FusedLocationProviderClient with WorkManager.
Example:
FusedLocationProviderClient(this).requestLocationUpdates(locationRequest, callback, null)
What is the difference between ConstraintLayout and RelativeLayout?
Type: Conceptual
Expected Answer: ConstraintLayout is more flexible, RelativeLayout is deprecated.
How do you implement a custom view animation in Android?
Type: Coding Challenge
Expected Answer:
view.animate().alpha(0f).setDuration(1000).start()
What is the role of the Android Studio Database Inspector?
Type: Conceptual
Expected Answer: Inspects and modifies app databases.
How do you implement a custom share intent in Android?
Type: Practical
Expected Answer:
val shareIntent = Intent().apply { action = Intent.ACTION_SEND putExtra(Intent.EXTRA_TEXT, "Share this") type = "text/plain" } startActivity(Intent.createChooser(shareIntent, null))
What is the difference between Room and ContentProvider?
Type: Conceptual
Expected Answer: Room is for local data, ContentProvider for inter-app data sharing.
How do you implement a custom onboarding screen in Android?
Type: Coding Challenge
Expected Answer:
ViewPager2().apply { adapter = OnboardingAdapter() }
What is the role of the Android Studio Motion Editor?
Type: Conceptual
Expected Answer: Creates and edits MotionLayout animations.
How do you handle multi-language support in Android?
Type: Practical
Expected Answer: Use res/values-<lang> for localized resources.
Example:
<string name="hello" lang="fr">Bonjour</string>
What is the difference between onCreateView and onViewCreated in Fragments?
Type: Conceptual
Expected Answer: onCreateView creates the view, onViewCreated runs after view creation.
How do you implement a custom recycler view item decoration?
Type: Coding Challenge
Expected Answer:
class MyItemDecoration : RecyclerView.ItemDecoration() { override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) { outRect.top = 16 } }
What is the role of the Android Studio Logcat?
Type: Conceptual
Expected Answer: Displays app logs for debugging.
How do you implement a custom navigation drawer in Android?
Type: Coding Challenge
Expected Answer:
DrawerLayout().apply { addDrawerListener(object : DrawerLayout.DrawerListener { override fun onDrawerOpened(drawerView: View) {} override fun onDrawerClosed(drawerView: View) {} }) }
Conclusion
This comprehensive guide of 155 Android Mobile App Development interview questions for 2025 equips you with the knowledge to excel in technical interviews. Spanning beginner to expert levels, these questions include real-world scenarios, coding examples, and practical challenges to prepare you for competitive exams and real-world applications. Practice the examples, master Kotlin and Android SDK, and explore resources like Android Developer Docs, Medium, and DZone for further study. Ace your Android interview and secure your dream role in 2025!
No comments:
Post a Comment
Thanks for your valuable comment...........
Md. Mominul Islam