Title: Theory / Unimportant / CS / Programming / Java / Android / Tutorial
Tags: computer_to_instruction automatedNewLineAfterCommaSpace Variable_missing_meaning seen_description variable

Name: principle of least privilege
Definition: each app, by default, has access only to the components that it requires to do its work and no more
Page: https://developer.android.com/guide/components/fundamentals

Name: App components
Definition: Activities
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Definition2: Services
Conjdef: Either
Definition3: Broadcast receivers
Intuition: an entry point through which the system or a user can enter your app.
Definition4: Content providers

Name: Activity
Definition: the window in which your app draws its UI, and receive user actions
Page: https://developer.android.com/guide/components/fundamentals
https://developer.android.com/codelabs/kotlin-android-training-app-anatomy#2
https://developer.android.com/codelabs/basic-android-kotlin-training-create-dice-roller-app-with-button?continue=https://developer.android.com/courses/pathways/android-basics-kotlin-four#codelab-https://developer.android.com/codelabs/basic-android-kotlin-training-create-dice-roller-app-with-button#3
Context: Android
Example: one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails
Example2: can start the activity in the email app that composes new mail to allow the user to share a picture.
DefType: component
Applied to: Email
Applied to2: a camera app

Question: Examples of activities facilitating the following key interactions between system and app:
Answer: Keeping track of what the user currently cares about (what is on screen) to ensure that the system keeps running the process that is hosting the activity.
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Answer2: Knowing that previously used processes contain things the user may return to (stopped activities), and thus more highly prioritize keeping those processes around.
Answer3: Helping the app handle having its process killed so the user can return to activities with their previous state restored.
Answer4: Providing a way for apps to implement user flows between each other, and for the system to coordinate these flows. (The most classic example here being share.)

Name: Service
Definition: a general-purpose entry point for keeping an app running in the background for all kinds of reasons
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Example: Play music in backgruop
Example2: fetch data over the network without blocking user interaction with an activity
Example3: long computation ?
DefType: component

Name: Broadcast receiver
Definition: enables the system to deliver events to the app outside of a regular user flow, allowing the app to respond to system-wide broadcast announcements
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Example: schedule an alarm to post a notification to tell the user about an upcoming event
DefType: Component

Name: Content provider
Definition: manages a shared set of app data and allow other app to query and modify the data if allowed
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Example: Access to contact info (with right permission)
Example2: Give access to one particular element of clipboard

Name: Intent
Definition: Component name
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Definition2: Action
Example: View something
Conjdef: Optionally, all of
Definition3: Data
Example2: Asking for some user contact information
Intuition: Something to start an activity, a service or a broadcast receveiver
Definition4: Category
Typ: Asynchronous message
Definition5: Extra
Definition6: Flags

Name: Explicit intent
Definition: An intent without component name
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Example: Displaying some place on a map using a specific map

Name: Implicit intent
Definition: An intent without component name
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Example: Stating to show some place on a map, not specifying which app deals with it

Name: Manifest file
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Definition2: required permissions
Example: list of components of the app
Conjdef: containing all of
Definition3: the minimum API Level required by the app, based on which APIs the app uses.
Definition4: Declares hardware and software features used or required by the app, such as a camera, bluetooth services, or a multitouch screen.
Denoted by: toplevel AndroidManifest.xml
Definition5: Declares API libraries the app needs to be linked against (other thanthe Android framework APIs), such as the Google Maps library.
DefType: Configuration file
Definition6: Potentially intent-filter, declaring the capabilities of the activity so it can respond to intents from other apps.

Question: What's the point of adding requirement in manifest
Answer: App Market can decide whether a device can run it
Page: https://developer.android.com/guide/components/fundamentals
Context: Android

Name: Resources
Definition: Anything appart from code required by an app
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Definition2: multimedia
Example: String
Definition3: GUI

Instruction: R.foo.bar
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: Android
Returns: The value of the resource bar in folder foo of the resource

Instruction: startActivity(intent)
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: Android
Returns: Start an activity with intent
Variables: act an activity class
intent an intent

Instruction: startActivityForResult(
  intent,
  i
)
Page: https://developer.android.com/guide/components/fundamentals
Effect: Similar to startActivityForResult(intent). The value returned is sent to current onActivityResult() where i identifies the call.
Language: Java
Context: Android
Variables: act an activity class
intent an intent

Name: Intent filter
Definition: one or multiple action names that can be accepted
Page: https://developer.android.com/guide/components/intents-filters.html
Variables: act an activity class
intent an intent
Context: Android
Definition2: the kind of data that can be accepted
Example: An app can states it can show places in map
Definition3: the category(ies) of intents accepted
DefType: an expression in an app's manifest file that specifies the type of intents that the component would like to receive, with

Instruction: ACTION_VIEW
Page: https://developer.android.com/guide/components/intents-filters.html
Language: Java
Context: Android
Returns: Constant stating that we want to show something given in the intent to the user
Variables: act an activity class
intent an intent

Instruction: ACTION_SEND
Page: https://developer.android.com/guide/components/intents-filters.html
Language: Java
Context: Android
Returns: The intent contains some information to send (email, social media)
Variables: act an activity class
intent an intent

Name: Flags
Definition: metadata for the intent
Page: https://developer.android.com/guide/components/fundamentals
Variables: act an activity class
intent an intent
Context: Android Intention
Definition2: how to treat the intent after it's launched (for example, whether it belongs in the list of recent activities).
Example: instruct the Android system how to launch an activity (for example, which task the activity should belong to)

Name: Extra
Definition: Key-value pairs that carry additional information required to accomplish the requested action.
Page: https://developer.android.com/guide/components/fundamentals
Variables: act an activity class
intent an intent
Context: Android Intention
Example: when creating an intent to send an email with ACTION_SEND, you can specify the to recipient with the EXTRA_EMAIL key, and specify the subject with the EXTRA_SUBJECT key.

Name: Category
Definition: A string containing additional information about the kind of component that should handle the intent.
Page: https://developer.android.com/guide/components/fundamentals
Variables: act an activity class
intent an intent
Context: Android Intention
Example: CATEGORY_BROWSABLE
Example2: CATEGORY_LAUNCHER

Name: Data
Definition: An Uri and potentially mime type
Page: https://developer.android.com/guide/components/fundamentals
Variables: act an activity class
intent an intent
Context: Android Intention
Example: Path of a file

Name: Action
Definition: A string that specifies the generic action to perform (such as view or pick).
Page: https://developer.android.com/guide/components/fundamentals
Variables: act an activity class
intent an intent
Context: Android Intention
Example: ACTION_VIEW

Instruction: intent.setAction(act)
Page: https://developer.android.com/guide/components/fundamentals
Effect: Change intent to state action is act
Language: Java
Context: Android Intention
Variables: intent an intent
act an action

Instruction: intent.setData(Uri)
Page: https://developer.android.com/guide/components/fundamentals
Effect: Set data's Uri to uri and remove mime information
Language: Java
Context: Android Intention
Variables: intent an intent
Uri an Uri

Instruction: intent.setType(mime)
Page: https://developer.android.com/guide/components/fundamentals
Effect: Set mime type to mime and remove data
Language: Java
Context: Android Intention
Variables: intent an intent
mime a mime type

Instruction: CATEGORY_BROWSABLE
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: Android
Returns: The target activity allows itself to be started by a web browser to display data referenced by a link, such as an image or an e-mail message.

Instruction: CATEGORY_LAUNCHER
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: Android
Returns: The activity is the initial activity of a task and is listed in the system's application launcher.

Instruction: intent.addCategory(cat);
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: Android
Returns: Add the category cat to intent
Variables: intent an Intent
cat a category

Instruction: intent.putExtra(key, value);
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: Android
Returns: Add a new extra to intent where key is associated to value

Instruction: intent.putExtras(bun);
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: Android
Returns: Add all values from bundle bun to extras

Instruction: intent.resolveActivity();
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: Android
Returns: Whether some activity can answer to this intent

Instruction: Intent.createChooser(
  intent,
  title
)
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: Android
Returns: A new intent, forcing to use a chooser to perform intent
Variables: intent an intent

Instruction: exported
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: intent-filter
Returns: whether another app can start through this intent-filter

Instruction: ACTION_MAIN
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: intent-filter
Returns: Entry point of an app, when the user click on the icon

Instruction: CATEGORY_LAUNCHER
Page: https://developer.android.com/guide/components/fundamentals
Language: Java
Context: intent-filter
Returns: This activity's icon should be placed in the system's app launcher

Name: Pending Intent
Definition: An intent granting permission to a foreign application to use the contained Intent as if it were executed from your app's own process
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Example: Declaring an intent to be executed when the user performs an action with your Notification (the Android system's NotificationManager executes the Intent).
Example2: Declaring an intent to be executed when the user performs an action with your App Widget (the Home screen app executes the Intent).
Example3: Declaring an intent to be executed at a specified future time (the Android system's AlarmManager executes the Intent).

Question: An intent that contains neither a URI nor a MIME type passes the test
Answer: only if the filter does not specify any URIs or MIME types.
Page: https://developer.android.com/guide/components/fundamentals
Context: Android

Question: intent that contains a URI but no MIME type (neither explicit nor inferable from the URI) passes the test
Answer: only if its URI matches the filter's URI format and the filter likewise does not specify a MIME type.
Page: https://developer.android.com/guide/components/fundamentals
Context: Android

Question: An intent that contains a MIME type but not a URI passes the test
Answer: only if the filter lists the same MIME type and does not specify a URI format.
Page: https://developer.android.com/guide/components/fundamentals
Context: Android

Question: An intent that contains both a URI and a MIME type (either explicit or inferable from the URI) passes.
Answer: the MIME type part of the test only if that type matches a type listed in the filter and
Page: https://developer.android.com/guide/components/fundamentals
Context: Android
Answer2: either the filter has no uri
Example: or the uri test pass

Instruction: android:permission=”foo”
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Effect: states that the activity needs permission foo
Language: Java
Context: android activity

Instruction: <uses-permission android:name="foo" />
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Effect: ???
Language: Java
Context: android manifests

Name: Lifecycle states of an activity
Definition: Created
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: android
Definition2: Started
Definition3: Resumed
Definition4: Paused
Definition5: Stopped
Definition6: Destroyed

Instruction: onCreate()
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Effect: initialize the essential components of your activity
Language: Java
Context: Android activity
Where to use it: fires when the system creates your activity
Example: your app should create views and bind data to lists here

Instruction: onCreate(savedInstanceState)
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Effect: initialize the essential components of your activity, using the value saved when the activity was destroyed.
Language: Java
Context: Android activity
Where to use it: fires when the system creates your activity
Example: your app should create views and bind data to lists here

Instruction: onStart()
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Effect: final preparations for coming to the foreground and becoming interactive.
Language: Java
Context: Android activity
Where to use it: Just after onCreate is used

Instruction: onResume()
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Effect: Most of an app’s core functionality
Language: Java
Context: Android activity
Where to use it: before the activity starts interacting with the user. I.e. after onStart and onPause

Instruction: onPause()
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Effect: Updating the GUI the user could potentially see even without being able to interact with
Language: Java
Context: Android activity
Where to use it: the activity loses focus and enters a Paused state

Instruction: onState()
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Language: Java
Context: Android activity
Where to use it: when the activity enter state State

Instruction: onRestart()
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Language: Java
Context: Android activity
Where to use it: Activity was stopped and is seen again

Instruction: onDestroy()
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Effect: ensure that all of an activity’s resources are released
Language: Java
Context: Android activity
Where to use it: the activity, or the process containing it, is destroyed.

Question: Which starts are possible after created ?
Answer: Started
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: Android activity

Question: Which starts are possible after started?
Answer: Resumed
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: Android activity

Question: Which starts are possible after resumed
Answer: Paused
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: Android activity

Question: Which starts are possible after pause ?
Answer: Restarted or Destroyed
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: Android activity

Question: Which starts are possible after restart ?
Answer: Started
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: Android activity

Question: Which starts are possible after destroy ?
Answer: Nothing
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: Android activity

Instruction: ON_STATE
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Language: Java
Context: Android activity
Returns: Constant stating to lifecycle-aware component that app moves to state STATE
Variables: state a possible state of Lifecycle

Name: Paused state
Definition: The activity loses focus
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: Android activity
Example: Updating position on map
Example2: In multiple window mode, the focus is in the other window
Example3: A transparant activity is displayed on top of current activity

Name: Stopped state
Definition: Activity is no longer visible to user
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: Android activity
Definition2: Sava data in the db/online
Example: Another activity cover the whole screen

Name: Destroyed
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: Android activity
Example: User finish the activity
Example2: Rotation of screen

Question: What to do in during destruction to know the cause of destruction
Answer: Use a view model; it's method isFinishing state whethe value is finishing. onCleared is called if it's the case
Page: https://developer.android.com/guide/components/activities/intro-activities.html
Context: Android activity

Question: How do Android free spaces ?
Answer: By killing processes (and not activities)
Page: https://developer.android.com/guide/components/activities/activity-lifecycle.html

Name: Instance state
Definition: saved data that the system uses to restore the previous state
Page: https://developer.android.com/guide/components/activities/activity-lifecycle.html
Typ: Bundle

Instruction: onSaveInstanceState()
Effect: save state information to an instance state bundle
Language: Java
Where to use it: When activity stop, and the user didn't explicitly request it
Example: saves transient information about the state of the activity's view hierarchy, such as the text in an EditText widget or the scroll position of a ListView widget.

Instruction: onRestoreInstanceState(savedInstanceState)
Page: bb
Effect: Restoring instance state as it was before its destruction
Language: Java
Where to use it: When activity restart, and the user didn't explicitly request its destruction

Instruction: onActivityResult(
  requestCode,
  resultCode,
  intent
)
Page: https://developer.android.com/guide/components/activities/activity-lifecycle.html#java
Effect: Deal with the fact that child activity number requestCode halted, with status resultCode, optionally letting us know intent
Language: Java
Where to use it: When a child activity halts

Question: When an activity A starts an activity B, in which order lifecycle events occurs ?
Answer: A.onPause
Page: https://developer.android.com/guide/components/activities/activity-lifecycle.html#java
Answer2: B.onCreate
Answer3: B.onStart
Answer4: B.onResume
Answer5: Potentially A.onStop

Question: What occurs when user press on Back button in an activity ?
Answer: either onBackPressed if defined or
Page: https://developer.android.com/guide/components/activities/state-changes
Answer2: onPause, onStop and onDestroy

Instruction: onBackPressed
Page: https://developer.android.com/guide/components/activities/state-changes
Language: Java
Where to use it: when the user press the back button on the phone

Question: How should activity be tested ?
Answer: What occurs when activity is interupted (phone call)
Page: https://developer.android.com/guide/components/activities/testing
Answer2: What occurs if it is destroyed by straying long in background
Answer3: What occurs when the window change

Instruction: A set of action performed to test an activity
Page: https://developer.android.com/guide/components/activities/testing
Language: java
Typ: Scenario

Instruction: activityScenarioRule<MyActivity>()
Page: https://developer.android.com/guide/components/activities/testing
Language: java
Returns: A scenario for myActivity satrting by launch and ending by close

Instruction: launchActivity<MyActivity>()
Page: https://developer.android.com/guide/components/activities/testing
Language: java
Returns: An empty scenario for activity MyActivity

Instruction: scenario.moveToState(state)
Page: https://developer.android.com/guide/components/activities/testing
Effect: change the state of the tested activity to state; if it's not current state. Otherwise nothing
Language: java
Variables: scenario a scenario

Instruction: scenario.state
Page: https://developer.android.com/guide/components/activities/testing
Language: java
Returns: The current state of the activity
Variables: scenario a scenario

Instruction: scenario.recreate()
Page: https://developer.android.com/guide/components/activities/testing
Effect: Simulate the system having low power, and destroying/recreating the activity
Language: java
Variables: scenario a scenario

Instruction: scenario.result
Page: https://developer.android.com/guide/components/activities/testing
Effect: The result of the activity scenario
Language: java
Variables: scenario a scenario
Exception: runtimeException if activity does not finish quiclky

Name: Task
Definition: a collection of activities that users interact with when performing a certain job
Page: https://developer.android.com/guide/components/activities/testing

Name: Back stack
Definition: The list of activities in order in which they were opened
Page: https://developer.android.com/guide/components/activities/testing
Etymology: List of activity you'll see when pressing back

Question: Example of reason why the programmer may need to deal directly with back stack
Answer: Start an actitivy in a new task
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Answer2: Use an activity already existing in a distinct task
Answer3: Clear all back stack and go back to root

Question: If activity A calls activity B; that A states how it wants to interact with B, and B's manifest state how it want to interact with called, what is done ?
Answer: A's preference is honored
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack

Variable: launchMode
Meaning: specifies an instruction on how the activity should be launched into a task
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Context: Activity manifest
Language: java
Value: standard
Value2: singleTop
Value3: singleTask
Value4: singleInstance

Name: standard
Definition: The system creates a new instance of the activity in the task from which it was started and routes the intent to it. The activity can be instantiated multiple times, each instance can belong to different tasks, and one task can have multiple instances.
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Context: Activity manifest launchMode

Name: singleTop
Definition: If an instance of the activity already exists at the top of the current task, the system routes the intent to that instance through a call to its onNewIntent() method, rather than creating a new instance of the activity.
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Context: Activity manifest launchMode

Instruction: onNewIntent
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Effect: Reopen the activity, with a new intent
Language: Java
Context: activity

Instruction: FLAG_ACTIVITY_LAUNCH_MODE
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Language: Java
Context: activity
Returns: State that activity opened should start with launch mode LAUNCH_MODE

Name: singleTask
Definition: The system creates a new task and instantiates the activity at the root of the new task. However, if an instance of the activity already exists in a separate task, the system routes the intent to the existing instance through a call to its onNewIntent() method, rather than creating a new instance. Only one instance of the activity can exist at a time.
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Context: Activity manifest launchMode
Example: Browser is always its own task. Any new page to open will be opened in the task already having the browser

Name: singleInstance
Definition: Same as "singleTask", except that the system doesn't launch any other activities into the task holding the instance. The activity is always the single and only member of its task; any activities started by this one open in a separate task.
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Context: Activity manifest launchMode

Instruction: taskAffinity
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Language: Java
Context: activity
Returns: indicates which task an activity prefers to belong to
Name: affinity

Instruction: FLAG_ACTIVITY_NEW_TASK
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Language: Java
Context: activity
Returns: the system looks for a different task to house the new activity

Instruction: allowTaskReparenting
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Language: Java
Context: activity
Returns: In this case, the activity can move from the task it starts to the task it has an affinity for, when that task comes to the foreground.
Example: suppose that an activity that reports weather conditions in selected cities is defined as part of a travel app. It has the same affinity as other activities in the same app (the default app affinity) and it allows re-parenting with this attribute. When one of your activities starts the weather reporter activity, it initially belongs to the same task as your activity. However, when the travel app's task comes to the foreground, the weather reporter activity is reassigned to that task and displayed within it.

Name: importance hierarchy
Page: https://developer.android.com/guide/components/activities/process-lifecycle
Definition2: A visible process
Example: A foregroupnd process
Conjdef: In this order
Definition3: A service process
Definition4: A cached process

Name: A foreground process
Definition: running an Activity at the top of the screen that the user is interacting with (its onResume() method has been called)
Page: https://developer.android.com/guide/components/activities/process-lifecycle
Context: Android
Definition2: has a BroadcastReceiver that is currently running (its BroadcastReceiver.onReceive() method is executing).
Conjdef: either
Definition3: has a Service that is currently executing code in one of its callbacks (Service.onCreate(), Service.onStart(), or Service.onDestroy()).
DefType: A process that is required for what the user is currently doing,

Name: A visible process
Definition: It is running an Activity that is visible to the user on-screen but not in the foreground (its onPause() method has been called). This may occur, for example, if the foreground Activity is displayed as a dialog that allows the previous Activity to be seen behind it.
Page: https://developer.android.com/guide/components/activities/process-lifecycle
Context: Android
Definition2: It has a Service that is running as a foreground service, through Service.startForeground() (which is asking the system to treat the service as something the user is aware of, or essentially visible to them).
Conjdef: A process doing work that the user is currently aware of, so killing it would have a noticeable negative impact on the user experience. Either
Definition3: It is hosting a service that the system is using for a particular feature that the user is aware, such as a live wallpaper, input method service, etc.

Name: A service process
Definition: A process holding a Service that has been started with the startService() method.
Page: https://developer.android.com/guide/components/activities/process-lifecycle
Context: Android
Example: background network data upload or download

Name: A cached process
Definition: A process that is not currently needed
Page: https://developer.android.com/guide/components/activities/process-lifecycle
Context: Android

Question: How to send data accross process boundaries ?
Answer: Parcelable
Page: https://developer.android.com/guide/components/activities/process-lifecycle
Context: Android
Answer2: Bundle

Question: How to send data accross activities ?
Answer: Through intent. But limit size to a few KB
Page: https://developer.android.com/guide/components/activities/process-lifecycle
Context: Android

Name: Fragment
Definition: A behavior or a portion of user interface
Page: https://developer.android.com/guide/components/activities/process-lifecycle
Context: Android
Example: List of article in one fragment, an article content in another
Intuition: You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a "sub activity" that you can reuse in different activities).
Applied to: Newspaper

Instruction: onCreateView()
Language: java
Where to use it: The system calls this when it's time for the fragment to draw its user interface for the first time.
Typ: View

Typ: DialogFragment
Meaning: a floating dialog
Language: java

Typ: ListFragment
Meaning: a list of items that are managed by an adapter (such as a SimpleCursorAdapter), similar to ListActivity.
Language: java

Typ: PreferenceFragmentCompat
Meaning: Displays a hierarchy of Preference objects as a list. This is used to create a settings screen for your application.
Language: java

Instruction: todo
Language: java
Returns: Remaining of Fragment

Instruction: "tel:number"
Language: java
Returns: An uri representing phone number number

Instruction: Intent.ACTION_DIAL
Language: java
Returns: Intent stating to state number given as parameter

Instruction: geo:Address
Language: java
Returns: An URI representing some adress or GPS location

Instruction: Uri.parse("http://www.address")
Language: java
Returns: An URI representing a web address

Name: Android App Links
Definition: allow an app to designate itself as the default handler of a given type of link.
Page: https://developer.android.com/training/app-links
Intuition: User who have app will use it, users who don't won't be penalized and can simply go on the web
Assuming: Android 6.0 (API level 23)and higher

Name: Instant apps suppors
Definition: system allowing to run an app without installing it
Page: https://developer.android.com/training/app-links

Question: How to create app links ?
Answer: Create deep links to specific content in your app: In your app manifest, create intent filters for your website URIs and configure your app to use data from the intents to send users to the right content in your app. Learn more in Create Deep Links to App Content.
Page: https://developer.android.com/training/app-links
Answer2: Add verification for your deep links: Configure your app to request verification of app links. Then, publish a Digital Asset Links JSON file on your websites to verify ownership through Google Search Console. Learn more in Verify App Links.

Question: When a clicked link or programmatic request invokes a web URI intent, the Android system tries:
Answer: Open the user's preferred app that can handle the URI, if one is designated.
Page: https://developer.android.com/training/app-links
Answer2: Open the only available app that can handle the URI.
Answer3: Allow the user to select an app from a dialog

Instruction: Intent filter with categories default and browsable, action ACTION_VIEW and data scheme and the kind of url to read
Page: https://developer.android.com/training/app-links
Effect: Ensure the activity can read url of a specific form instead of browser
Language: Java
Context: Activity manifest

Name: Recent screen
Definition: a system-level UI that lists recently accessed activities and tasks
Page: https://developer.android.com/guide/components/activities/recents
Name2: Overview screen
Name3: recent task list
Notation3: recent apps

Instruction: FLAG_ACTIVITY_NEW_DOCUMENT
Page: https://developer.android.com/guide/components/activities/recents
Language: Java
Returns: insert a logical break so that the system treats your activity as a new task in the Recents screen,

Instruction: FLAG_ACTIVITY_MULTIPLE_TASK
Page: https://developer.android.com/guide/components/activities/recents
Language: Java
Returns: the system always creates a new task with the target activity as the root

Instruction: android:documentLaunchMode
Page: https://developer.android.com/guide/components/activities/recents
Effect: Specifies how the activity launch
Language: Java
Context: <activity>

Instruction: android:excludeFromRecents
Page: https://developer.android.com/guide/components/activities/recents
Effect: Don't add the task as a recent screen
Language: Java
Context: <activity>

Variable: Maximal number of task from this activity that can be in recent screens
Page: https://developer.android.com/guide/components/activities/recents
Context: <activity>
Language: java
Initialization: 16
Value: android:excludeFromRecents

Instruction: finishAndRemoveTask()
Page: https://developer.android.com/guide/components/activities/recents
Effect: same as finish, and ensure that task is removed from recent screen even if it was launched with flag ACTIVITY_RETAIN_IN_RECENTS
Language: java
Context: <activity>

Name: Static shortcut
Definition: Shortcut packagedi n app bundle
Page: https://developer.android.com/guide/topics/ui/shortcuts
Context: Android
Example: For example, if the user wants to view their calendar or email in a specific way, using a static shortcut ensures that their experience in performing a routine task is consistent.

Name: Dynamic shortcut
Definition: Shortcut to app whihc can be published, updated, and removed by your app only at runtime.
Page: https://developer.android.com/guide/topics/ui/shortcuts
Context: Android
Example: if you build a game that allows the user to start from their current level on launch, the shortcut will need to be updated frequently. Using a dynamic shortcut allows the shortcut to be updated each time the user clears a level.

Name: Pinned shortcut
Definition: Shortcut which can be added to supported launchers at runtime, if the user grants permission.
Page: https://developer.android.com/guide/topics/ui/shortcuts
Context: Android
Example: pin a specific website to the launcher.

Instruction: <meta-data android:name="android.app.shortcuts"
                 android:resource="@xml/shortcuts" />
Page: https://developer.android.com/guide/topics/ui/shortcuts/creating-shortcuts
Effect: Let app know to check xml/shortcuts.iml for description of shortcuts
Language: Java
Context: Android activity

Name: Widget
Definition: at-a-glance" views of an app's most important data and functionality that is accessible right from the user's home screen
Page: https://developer.android.com/guide/topics/appwidgets/overview

Name: Information widget
Definition: Which which typically display a few crucial information elements that are important to a user and track how that information changes over time.
Page: https://developer.android.com/guide/topics/appwidgets/overview
Example2: clock widgets

Name: Collection widget
Definition: browsing the collection
Page: https://developer.android.com/guide/topics/appwidgets/overview
Definition2: Opening an element of the collection
Conjdef: Widget which specializes in displaying multitude elements of the same type, mostly for

Name: Control widget
Definition: Widget which displays often used functions that the user can trigger right from the home screen without having to open the app first.
Page: https://developer.android.com/guide/topics/appwidgets/overview
Intuition: remote controls for an app

Name: Hybrid widget
Definition: A widget which is not any of the three widgets
Page: https://developer.android.com/guide/topics/appwidgets/overview

Question: Which gestures can be used in widgets
Answer: Touch
Page: https://developer.android.com/guide/topics/appwidgets/overview
Answer2: Vertical swipe

Typ: launchMode
TypMeaning: specifies an instruction on how the activity should be launched into a task
Page: https://developer.android.com/guide/components/activities/tasks-and-back-stack
Language: java
Context: Activity manifest
Value: standard
Value2: singleTop
Value3: singleTask
Value4: singleInstance

Name: Layout inflation
Definition: Transforming an xml layout definition into JVM object
Page: https://developer.android.com/codelabs/kotlin-android-training-app-anatomy#2
Chapter: 01.2
Section: 3 step 1

Variable: compileSdkVersion
Meaning: API level that Gradle should use to compile your app.
Page: https://developer.android.com/codelabs/kotlin-android-training-images-compat#5
Language: gradle
Section: 6.1
Chapter: 1.3

Variable: targetSdkVersion
Meaning: the most recent API that you have tested your app against
Page: https://developer.android.com/codelabs/kotlin-android-training-images-compat#5
Language: gradle
Section: 6.1
Chapter: 1.3

Variable: minSdkVersion
Meaning: the oldest version of Android on which your app will run
Page: https://developer.android.com/codelabs/kotlin-android-training-images-compat#5
Language: gradle
Section: 6.1
Chapter: 1.3

Name: androidx
Definition: namespace for the Android Jetpack libraries
Page: https://developer.android.com/codelabs/kotlin-android-training-images-compat#5
Chapter: 1.3
Section: 6.3

Instruction: xmlns:foo=url
Page: https://developer.android.com/codelabs/kotlin-android-training-images-compat#5
Effect: This activity uses the attributes from namespace foo as defined in url
Language: xml
Context: activity
Chapter: 1.6
Section: 3.
Extra: url is not actually a URL, but a constant known by android compiler

Name: Jetpack
Definition: An android library to port to older versions API from more recent one
Page: https://developer.android.com/codelabs/kotlin-android-training-images-compat#8
Chapter: 1.3
Section: 8
Extra: url is not actually a URL, but a constant known by android compiler

Variable: android:orientation
Meaning: Whether the linear layout is vertical or horizontal
Page: https://developer.android.com/codelabs/kotlin-android-training-linear-layout#3
Context: linearLayout
Chapter: 1.4

Variable: android:padding
Meaning: The padding in all direction
Page: https://developer.android.com/codelabs/kotlin-android-training-linear-layout#5
Context: android view
Language: xml
Section: 4
Chapter: 1.6

Variable: android:layout_margin
Meaning: the margin in all direction
Page: https://developer.android.com/codelabs/kotlin-android-training-linear-layout#5
Context: view
Language: xml
Section: 4
Chapter: 1.6

Variable: android:layout_marginSide
Meaning: The margin on Side
Page: https://developer.android.com/codelabs/kotlin-android-training-linear-layout#5
Context: view
Language: xml
Section: 4
Chapter: 1.6
Variables: Side being Top, Bottom, Start, End, Left, Right

Variable: android:paddingSide
Meaning: The padding on Side
Page: https://developer.android.com/codelabs/kotlin-android-training-linear-layout#5
Context: view
Language: xml
Section: 4
Chapter: 1.6
Variables: Side being Top, Bottom, Start, End, Left, Right

Name: Padding
Definition: The side inside the view and around the content
Page: https://developer.android.com/codelabs/kotlin-android-training-linear-layout#5
Chapter: 1.6
Section: 4
Variables: Side being Top, Bottom, Start, End, Left, Right
Context: view

Name: Margin
Definition: Part outside of the view in which there should be no content
Page: https://developer.android.com/codelabs/kotlin-android-training-linear-layout#5
Chapter: 1.6
Section: 4
Context: view

Name: Style
Definition: a collection of attributes that specify the appearance and format for a view
Page: https://developer.android.com/codelabs/kotlin-android-training-linear-layout#5
https://developer.android.com/codelabs/basic-android-kotlin-training-change-app-theme?continue=https://developer.android.com/courses/pathways/android-basics-kotlin-unit-2-pathway-2#codelab-https://developer.android.com/codelabs/basic-android-kotlin-training-change-app-theme#2
Chapter: 1.6
Section: 4
Context: Android

Typ: ScrollView
Meaning: a view group that allows the view hierarchy placed within it to be scrolled
Page: https://developer.android.com/codelabs/kotlin-android-training-linear-layout#7
Chapter: 1.8
Context: Android

Typ: View
Meaning: todo: all kinds of view
Page: https://developer.android.com/codelabs/kotlin-android-training-linear-layout#7
Chapter: 1.8
Context: Android

Typ: todo: all tools values
Page: https://developer.android.com/studio/write/tool-attributes
Chapter: 1.8
Context: Android

Typ: EditText
Meaning: A field with text the user can edit
Page: https://developer.android.com/codelabs/kotlin-android-training-interactivity#2
Chapter: 2.3
Section: 1
Context: Android

Variable: hint
Meaning: The text that is shown in an empty TextEdit, to help the user understand what should be filled there
Page: https://developer.android.com/codelabs/kotlin-android-training-interactivity#3
Context: EditText
Section: 4
Chapter: 2.3

Variable: inputType
Meaning: The expected type of input in the text field
Page: https://developer.android.com/codelabs/kotlin-android-training-interactivity#3
Context: EditText
Section: 4
Chapter: 2.3

Typ: Button
Meaning: a UI element that the user can tap to perform an action
Page: https://developer.android.com/codelabs/kotlin-android-training-interactivity#4
Chapter: 2.5
Context: Android

Instruction: view.visibility = gone
Page: https://developer.android.com/codelabs/kotlin-android-training-interactivity#4
Effect: Hides the view, and the view does not take up any space in the layout.
Context: Android View
Chapter: 2.5

Instruction: view.visibility = Invisible
Page: https://developer.android.com/codelabs/kotlin-android-training-interactivity#4
Effect: Hides the view, but the view still takes up space in the layout.
Context: Android View
Chapter: 2.5

Instruction: view.visibility = visible
Page: https://developer.android.com/codelabs/kotlin-android-training-interactivity#4
Effect: The view is visible.
Context: Android View
Chapter: 2.5

Typ: ConstraintLayout
Meaning: a ViewGroup that allows you to position and size child views in a flexible way.
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 2
Context: Android View

Name: A constraint
Definition: a connection or alignment between two UI elements
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 2
Context: Android View, ConstraintLayout

Name: Wrap Content
Definition: The view expands only as much as needed to contain its contents.
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 3
Context: Android View, ConstraintLayout

Name: Fixed constraint
Definition: You can specify a dimension as the view margin in the text box next to the fixed-constraint arrows
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 3
Context: Android View, ConstraintLayout

Name: Match Constraints
Definition: The view expands as much as possible to meet the constraints on each side, after accounting for the view's own margins.
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 3
Context: Android View, ConstraintLayout

Name: A chain
Definition: a group of views that are linked to each other with bidirectional constraints.
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 7
Context: Android View, ConstraintLayout

Name: The head of a chain
Definition: The first element of a chain. Top-most for vertical. On starting end for horizontal chain
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 7
Variables: C a chain
Context: Android View, ConstraintLayout

Name: A spread chain
Definition: Views are evenly spread in the available space, after margins are accounted for.
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 7
Context: Android View, ConstraintLayout

Name: A spread inside chain
Definition: - The first and the last views are attached to the parent on each end of the chain. The rest of the views are evenly spread in the available space.
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 7
Context: Android View, ConstraintLayout

Name: A packed chain
Definition: - The views are packed together, after margins are accounted for. You can then adjust the position of the whole chain by changing the bias of the chain's head view.
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 7
Context: Android View, ConstraintLayout

Name: A packed chain with bias
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 7
Context: Android View, ConstraintLayout

Name: A weighted chain
Definition: The views are resized to fill up all the space, based on the values set in the layout_constraintHorizontal_weight or layout_constraintVertical_weight attributes.
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 7
Context: Android View, ConstraintLayout

Question: What is the default chain style
Answer: spread chain
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 7
Context: Android View, ConstraintLayout

Question: The different chain styles
Answer: spread chain
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 7
Context: Android View, ConstraintLayout
Answer2: Spread inside
Answer3: Packed chain
Answer4: Packed chain with bias
Answer5: weighetd chain

Name: A baseline constraint
Definition: A constraint ensuring baseline of multiple texts are at the same level
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 10
Context: Android View, ConstraintLayout

Name: A design-time attribute
Definition: An attribute that is taken into account at design-time but ignored at compilation
Page: https://developer.android.com/codelabs/kotlin-android-training-constraint-layout#1
Chapter: 2.3
Section: 10
Context: Android View, ConstraintLayout
Example: A placeholder replaced by a real value at runtime
Denoted by: tool:foo

Instruction: findViewById(R.id.foo)
Page: https://developer.android.com/codelabs/kotlin-android-training-data-binding-basics#2
Context: Android View, ConstraintLayout
Chapter: 2.4
Section: 3
Returns: The view with id currently displayed or None
Time complexity: Linear in number of elements of the view. It traverses it entirely

Name: Data binding
Definition: create an object that contains a reference to each view
Page: https://developer.android.com/codelabs/kotlin-android-training-data-binding-basics#2
Chapter: 2.4
Section: 3
Context: Android View,

Question: Advantage of Data binding over findViewById
Answer: Code is shorter, easier to read, and easier to maintain than code that uses findViewById().
Page: https://developer.android.com/codelabs/kotlin-android-training-data-binding-basics#2
Chapter: 2.4
Section: 3
Context: Android View,
Answer2: Data and views are clearly separated. This benefit of data binding becomes increasingly important later in this course.
Answer3: The Android system only traverses the view hierarchy once to get each view, and it happens during app startup, not at runtime when the user is interacting with the app.
Answer4: You get type safety for accessing views. (Type safety means that the compiler validates types while compiling, and it throws an error if you try to assign the wrong type to a variable.)

Question: Advantage of findViewById over Data binding
Answer: Lower compilation time
Page: https://developer.android.com/codelabs/kotlin-android-training-data-binding-basics#2
Chapter: 2.4
Section: 3
Context: Android View,
Answer2: lower loading time of new activity

Instruction: <data>
  foo
</data>
Page: https://developer.android.com/codelabs/kotlin-android-training-data-binding-basics#2
Effect: Introduce variables foo to use in the remaining of the file
Language: xml
Context: Android activity,
Chapter: 2.4
Section: 3

Instruction: <variable
  name="varName"
  type="fully.qualified.type"
/>
Page: https://developer.android.com/codelabs/kotlin-android-training-data-binding-basics#2
Effect: Allow to use varName: fully.qualified.type from the activity class in the xml of the activity
Language: xml
Context: Android activity,
Chapter: 2.4
Section: 3