Commit 7aa8ecd1 authored by Davide Depau's avatar Davide Depau
Browse files

Merge branch 'Depau-revealjs-patch-96887' into 'revealjs'

Proposed changes

See merge request !2
parents 5bc4cf5c aa1e42b2
Pipeline #662 passed with stage
in 1 minute and 1 second
......@@ -141,7 +141,7 @@ On Android, the **`main`** function **does not exist**.
On Android, all software is built upon four main components
*(You will extend the code from four base classes)*
*(You will extend four base classes)*
----
......@@ -158,7 +158,7 @@ On Android, all software is built upon four main components
### Activity
Show and control an application's screen
Display and control an application's screen
----
......@@ -166,7 +166,7 @@ Show and control an application's screen
### Service
Run operations *in background*, without a graphical front end
Run operations *in the background*, without a graphical interface
----
......@@ -174,7 +174,7 @@ Run operations *in background*, without a graphical front end
- Activity and Service both extend **Context**
- Context gives information on the app runtime and the execution environment
- The majority of APIs require a defined Context
- The majority of APIs require a Context instance
----
......@@ -182,7 +182,7 @@ Run operations *in background*, without a graphical front end
### BroadcastReceiver
Any class that can receive events, called *broadcast*, which are sent by other apps or by the OS
Classes that can receive events, called *broadcasts*, which are sent by apps or by the OS
----
......@@ -196,7 +196,7 @@ A component which exposes some content on the device to other "consumers".
----
Interactions among these pieces are realized by
Interactions among these pieces are realized using
## Intent
......@@ -204,14 +204,14 @@ Interactions among these pieces are realized by
## Intent
- Allow communication with the OS
- Allow communication to the OS and apps
- They describe an action to be performed
----
## Intent - mini demo
Run from terminal (if the `adb` program is installed)
Run from the terminal (if the `adb` program is installed)
```sh
adb shell \
......@@ -244,7 +244,7 @@ adb shell \
----
## Intent - altro esempio
## Intent - another example
With this intent we want to:
......@@ -264,33 +264,34 @@ Let's recap from another point of view
We showed that:
- There are different ways to launch an app
- There isn't a specific starting point for the app's code
- There isn't a single specific starting point for the app's code
----
An app is not started just by tapping its icon from the launcher
An app is not only started by tapping its icon in the home screen
----
We should also remark that:
- We did not target a specific app or activity to use
- The app (one or more) was targeted by the OS, based upon:
- We did not specify a specific app or activity to be used
- The app (one or more) was chosen by the OS, based upon:
- Action
- related data type
- Data type
- Location
----
- This is one great feature of the Android platform
- Non-correlated apps can cooperate to provide integrated features
- Unrelated apps can cooperate to provide integrated features
----
For example, to show a PDF document to the user, an app may not include a PDF viewer.
However it can do that, and also expose its capability to other apps, that could therefore request to open a PDF through it.
However it may also include it, and also expose this capability to other apps, which could therefore ask it to show a PDF.
---
......@@ -304,9 +305,9 @@ Quick overview, for Java "speakers"
- Official Android programming language
- Object Oriented
- Can be compiled in
- Can be compiled into
- Java binaries
- native binaries
- Native binaries
- JavaScript
----
......@@ -315,7 +316,7 @@ Quick overview, for Java "speakers"
In short, about its syntax
- It ditches all bad stuff from Java
- It ditches all bad Java stuff
- concise
- null-safe
- avoids getter/setter methods
......@@ -325,10 +326,10 @@ In short, about its syntax
## Kotlin
- It inherits good stuff from other languages
- It inherits good stuff from many other languages
- type inference
- optional arguments
- coroutine
- coroutines
- many more
----
......@@ -339,27 +340,27 @@ Remember:
- static classes do not exist (use `object` instead)
- static methods do not exist (use `companion object` instead)
- it's mandatory to allow `null` as an allowed value for any declared variable
- exceptions are not created using `throws` keyword
- it is mandatory to specify whether `null` is a valid value for all declared variables
- exceptions don't have to be declared like in Java with the `throws` keyword
----
## Kotlin
With Android Studio or IntelliJ you can write it with a pretty basic knowledge
With Android Studio or IntelliJ you can start writing code with little knowledge
It's sufficient to know the basics, and then you can pretend it's Java
It's enough to know the basics, you can pretend it's Java and it will do its magic
----
## IntelliJ IDEA / Android Studio
- It will help you to leverage the syntax features to make the code concise
- It can convert Java code to Kotlin!
- It will help you leverage the syntax features to make the code concise
- It can automatically convert Java code to Kotlin!
---
## Theory it's over for today
## Enough theory for today!
----
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment