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
What is the purpose of that Android SDK
A set of development tools and APIs provided by Google for building Android apps
26
What is the Android Debug Bridge (ADB)
A command-line tool for communicating with a connected Android device
27
What's the difference between emulators and simulators
Emulators simulate the entire hardware and software, while simulators only simulate the software
28
What is the role of the R file in an Android Project
Contains resource identifiers generated by the android build system
29
What is the difference between a layout and a view
Layout contains views, while a view is a UI element displayed on the screen
30
What are the different types of layouts in Android
Linear layout, relative layout, constraint layout, frame layout, android table layout
31
What is the purpose of the Android Resource Manager
Manages non-code resources like images, strings, and layouts
32
Explain the concept of density-independent pixels (DP)
A unit of measurement for UI elements that adapts to different screen densities
33
What is the android asset Pipeline
Compiles and packages app resources for different device configurations
34
What is the difference between a drawable and a mipmap
Drawables are general-purpose images, while mipmaps are optimized for different screen densities
35
What is the purpose of the build.gradle file
Configures the build process for an Android project
36
What is the android Gradle plugin
A plugin that extends the Gradle build system for Android projects
37
What is dependency injection
A software design pattern for providing dependencies to components
38
What is the purpose of Dagger
A dependency injection framework for Android
39
What is a RecyclerView
A flexible view for displaying large lists of data efficiently
40
What is a CardView
A layout for displaying information inside a card with a shadow
41
What is a ViewPager
A container for dynamically adding and removing views
42
What is a TabLayout
A component for displaying tabs to switch between different views in a ViewPager
43
What is a CoordinatorLayout
A flexible layout that allows you to create complex layouts with fewer nested views
44
What is a Navigation Drawer
A side drawer that displays navigation options
45
What is a Bottom Navigation Bar
A Navigation bar at the bottom of the screen for switching between top-level destinations
46
What is a Progress Bar
A visual indicator of progress
47
What is a ProgressDialog
A dialog that displays progress information
48
What is the difference between a ProgressDialog and a Progress Bar
A ProgressDialog is a dialog-style progress indicator, while a Progress Bar is a view that can be embedded in other layouts
49
What is a Toast
A short message displayed at the bottom of the screen
50
What is a Snackbar
A message displayed at the bottom of the screen with an optional action
51
What is the lifecycle of a Fragment
Similar to an Activity, but with additional states onAttach(), onCreate(), onCreateView(), onViewCreated(), onStart(), onResume(), onPause(), onStop(), onSaveInstanceState(), onDestroyView(), onDestroy(), onDetach()
52
What is the difference between a back stack and a fragment back stack
Back stack manages the history of activities, while a fragment back stack manages the history of fragments within an Activity
53
What is the purpose of the View model class
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
What is the purpose of the LiveData class
Observable data holder that updates UI automatically when data changes
55
What is the purpose of the Room persistence library
An abstraction layer over SQLite for accessing database data
56
What is the purpose of Retrofit
A type-safe HTTP client for making network requests