Basics Flashcards

1
Q

What is the android architecture component

A

A collection of libraries that help you design robust, testable and maintainable apps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Difference between activity and fragment

A

Activity is a single, focused thing that the user can do. Fragment is a modular piece of an activity than can be reused

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a service

A

A component that runs in the background to perform long-running operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an intent

A

A message object used to request an action from another component

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain the android lifecycle

A

The series of states an activity goes through from creation to destruction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

List all lifecycle states

A

onCreate()
onStart() <— onRestart() ——-v
onResume()
Activity Running
onPause()
onStop() —> onRestart () ——-^
onDestroy()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What’s the difference of AsyncTask and Loader

A

AsynkTask for short background tasks like downloading a small image.
Loader for loading data from a content provider like fetching contacts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Content Provider

A

A component that manages a shared set of data, like contacts, or calendar events

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the difference between SharedPreferences and SQLite

A

SharedPreferences is for storing simple key-value data like user settings.
SQLite is for storing structured data, like a database of contacts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain the role of the AndoidManifest.xml file

A

Declares components, permissions, and other information about the app

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What’s the difference between a hard and a soft reference

A

A hard reference prevents an object from being garbage collected, while a soft reference allowed it to be collected under memory pressure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an activity

A

Is a single screen in an android app that represents the user interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a fragment

A

A modular piece of an activity that can be reused in different layouts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is AsyncTask

A

A class that performs background operations and publishes results on the UI thread

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a Loader

A

A component that asynchronously loads Data from a content provider in the background and delivers it to the UI
(Deprecated, use viewmodel and live data)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is SharedPreferences

A

A simple way to store key-value pairs of data, like user preferences

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What’s is SQLite

A

A lightweight database for storing structured data like contacts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What’s is a hard reference

A

A direct reference to an object that prevents it from being garbage collected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is a soft reference

A

A reference to an object that allows it to be garbage collected under memory pressure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is a soft reference

A

A weak reference to an object that allows it to be garbage collected under memory pressure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is a Broadcast receiver

A

A component that responds to system-wide broadcast announcements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is a notification

A

A message displayed to the user outside the app’s UI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Explain the concept of intents and intent filters

A

Intents are message objects that request an action from a component
Intent filters allow the system to find a suitable component

24
Q

What’s the difference between implicit and explicit intents

A

Explicit intents specify the target component, while implicit intents allow the system to find a suitable component

25
Q

What is the purpose of that Android SDK

A

A set of development tools and APIs provided by Google for building Android apps

26
Q

What is the Android Debug Bridge (ADB)

A

A command-line tool for communicating with a connected Android device

27
Q

What’s the difference between emulators and simulators

A

Emulators simulate the entire hardware and software, while simulators only simulate the software

28
Q

What is the role of the R file in an Android Project

A

Contains resource identifiers generated by the android build system

29
Q

What is the difference between a layout and a view

A

Layout contains views, while a view is a UI element displayed on the screen

30
Q

What are the different types of layouts in Android

A

Linear layout, relative layout, constraint layout, frame layout, android table layout

31
Q

What is the purpose of the Android Resource Manager

A

Manages non-code resources like images, strings, and layouts

32
Q

Explain the concept of density-independent pixels (DP)

A

A unit of measurement for UI elements that adapts to different screen densities

33
Q

What is the android asset Pipeline

A

Compiles and packages app resources for different device configurations

34
Q

What is the difference between a drawable and a mipmap

A

Drawables are general-purpose images, while mipmaps are optimized for different screen densities

35
Q

What is the purpose of the build.gradle file

A

Configures the build process for an Android project

36
Q

What is the android Gradle plugin

A

A plugin that extends the Gradle build system for Android projects

37
Q

What is dependency injection

A

A software design pattern for providing dependencies to components

38
Q

What is the purpose of Dagger

A

A dependency injection framework for Android

39
Q

What is a RecyclerView

A

A flexible view for displaying large lists of data efficiently

40
Q

What is a CardView

A

A layout for displaying information inside a card with a shadow

41
Q

What is a ViewPager

A

A container for dynamically adding and removing views

42
Q

What is a TabLayout

A

A component for displaying tabs to switch between different views in a ViewPager

43
Q

What is a CoordinatorLayout

A

A flexible layout that allows you to create complex layouts with fewer nested views

44
Q

What is a Navigation Drawer

A

A side drawer that displays navigation options

45
Q

What is a Bottom Navigation Bar

A

A Navigation bar at the bottom of the screen for switching between top-level destinations

46
Q

What is a Progress Bar

A

A visual indicator of progress

47
Q

What is a ProgressDialog

A

A dialog that displays progress information

48
Q

What is the difference between a ProgressDialog and a Progress Bar

A

A ProgressDialog is a dialog-style progress indicator, while a Progress Bar is a view that can be embedded in other layouts

49
Q

What is a Toast

A

A short message displayed at the bottom of the screen

50
Q

What is a Snackbar

A

A message displayed at the bottom of the screen with an optional action

51
Q

What is the lifecycle of a Fragment

A

Similar to an Activity, but with additional states
onAttach(),
onCreate(),
onCreateView(),
onViewCreated(),
onStart(),
onResume(),
onPause(),
onStop(),
onSaveInstanceState(),
onDestroyView(),
onDestroy(),
onDetach()

52
Q

What is the difference between a back stack and a fragment back stack

A

Back stack manages the history of activities, while a fragment back stack manages the history of fragments within an Activity

53
Q

What is the purpose of the View model class

A

In MVVM, It separates the UI from the business logic, while also storing data used by activities or fragments so it survives configuration changes

54
Q

What is the purpose of the LiveData class

A

Observable data holder that updates UI automatically when data changes

55
Q

What is the purpose of the Room persistence library

A

An abstraction layer over SQLite for accessing database data

56
Q

What is the purpose of Retrofit

A

A type-safe HTTP client for making network requests