0% found this document useful (0 votes)
57 views4 pages

App Development Interview Questions

The document provides a comprehensive overview of Flutter and Android development concepts, including definitions of key terms, components, and functionalities. It covers topics such as widgets, state management, navigation, and lifecycle in Flutter, as well as Android components like Activities, Services, and Intents. Additionally, it addresses best practices and tools for both platforms, such as Gradle, Retrofit, and memory management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views4 pages

App Development Interview Questions

The document provides a comprehensive overview of Flutter and Android development concepts, including definitions of key terms, components, and functionalities. It covers topics such as widgets, state management, navigation, and lifecycle in Flutter, as well as Android components like Activities, Services, and Intents. Additionally, it addresses best practices and tools for both platforms, such as Gradle, Retrofit, and memory management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1. What is Flutter?

Flutter is an open-source UI toolkit by Google for building natively compiled apps for
mobile, web, and desktop from a single codebase.

2. What language is used in Flutter?


Flutter uses Dart, a client-optimized language developed by Google.

3. What is a widget in Flutter?


Widgets are the basic building blocks of a Flutter app; everything is a widget — from
layout to UI elements.

4. Difference between StatelessWidget and StatefulWidget?


StatelessWidget doesn’t change during runtime; StatefulWidget can rebuild when its
state changes.

5. What is hot reload?


Hot reload allows developers to see changes instantly without restarting the app.

6. What is the pubspec.yaml file?


It manages app metadata, dependencies, fonts, assets, and package versions in
Flutter.

7. What is a BuildContext?
BuildContext is a handle to the location of a widget in the widget tree, used for
locating themes, navigation, etc.

8. What is Navigator in Flutter?


Navigator manages routes and navigation stack for moving between screens.

9. What is async/await in Dart?


It is used for writing asynchronous code in a synchronous-like way for better
readability.

10. What is setState()?


It tells Flutter to rebuild the widget with updated values when state changes.

11. How do you define routes in Flutter?


Routes are defined in the MaterialApp routes or using onGenerateRoute.

12. What is a Future in Dart?


A Future represents a potential value or error that will be available in the future.

13. What is the difference between mainAxisAlignment and crossAxisAlignment?


mainAxisAlignment aligns children along the main axis, crossAxisAlignment
along the cross axis.

14. How to handle gestures in Flutter?


Use GestureDetector or InkWell to handle touch interactions like tap, double
tap, etc.

15. What is the purpose of the initState method?


It initializes state before the widget builds; called only once when the widget is
inserted.

16. How to manage state in Flutter?


Common options are setState, Provider, Riverpod, Bloc, MobX, etc.

17. What is the difference between Expanded and Flexible?


Expanded takes all available space, Flexible takes space according to its flex
factor.

18. What is the use of keys in Flutter?


Keys help Flutter identify and preserve widgets when rebuilding UI.

19. What is ListView in Flutter?


A scrollable list of widgets that can be vertically or horizontally arranged.

20. How do you add images in Flutter?


Add them in the pubspec.yaml under assets and use Image.asset().

21. How does Flutter handle layouts?


With widgets like Column, Row, Stack, and Container using constraints and
alignment.

22. What is a FutureBuilder?


A widget that builds itself based on the latest snapshot of a Future.

23. What is Provider in Flutter?


A simple way to manage state and share data between widgets efficiently.

24. What is the difference between MaterialApp and CupertinoApp?


MaterialApp uses Material Design (Android), CupertinoApp uses iOS-style widgets.

25. Can we use native code in Flutter?


Yes, using platform channels you can communicate with Kotlin/Java or Swift/Obj-C.

26. What is Android?


Android is an open-source operating system based on Linux, primarily used for
mobile devices.

27. What is an Activity?


An Activity represents a single screen with a user interface.

28. What is a Fragment?


A Fragment is a reusable UI component within an Activity with its own lifecycle.

29. What is a Service in Android?


A Service runs in the background to perform long-running operations without UI.

30. What is an Intent?


An Intent is a messaging object used to request actions from other components.

31. What is a BroadcastReceiver?


It listens for system-wide broadcast announcements like battery low or SMS
received.

32. What is the AndroidManifest.xml file?


It declares components, permissions, and app metadata to the Android system.

33. What are the launch modes in Android?


standard, singleTop, singleTask, and singleInstance define how activities
are launched.

34. What is the use of ViewModel?


It stores UI-related data to survive configuration changes like screen rotation.

35. What is LiveData?


A lifecycle-aware observable data holder class that updates UI when data changes.

36. What is the difference between Serializable and Parcelable?


Parcelable is faster and optimized for Android, while Serializable is standard Java
serialization.

37. What is ANR (Application Not Responding)?


ANR occurs when the main thread is blocked for too long (usually 5 seconds).

38. What is the difference between dp, sp, and px?


dp is density-independent pixels, sp is scale-independent (for fonts), px is actual
pixels.

39. How do you pass data between activities?


Using Intent.putExtra() and getIntent().getExtra().

40. What is Room Database?


Room is a persistence library that provides an abstraction over SQLite.

41. What is Retrofit?


A type-safe HTTP client used to make API calls in Android.

42. What is the difference between compile and implementation in Gradle?


compile is deprecated; implementation hides the dependency from modules
that use your module.

43. What is an APK?


APK (Android Package) is the file format used to distribute and install Android apps.

44. What is ProGuard?


A tool to shrink, obfuscate, and optimize your code for release builds.

45. What is the use of Handler in Android?


It manages threads and allows communication between background and main
threads.

46. What is the Activity lifecycle?


onCreate(), onStart(), onResume(), onPause(), onStop(), onDestroy().

47. What is the purpose of Gradle in Android?


Gradle is the build automation system used to compile, package, and deploy
Android apps.

48. What is the use of ConstraintLayout?


It allows flexible and flat UI designs with fewer nested views.

49. What is Jetpack Compose?


A modern toolkit for building native Android UI using declarative Kotlin code.

50. How to avoid memory leaks in Android?


Avoid long-lived references to context, use WeakReferences, and unregister
listeners properly.

You might also like