Download presentation
Presentation is loading. Please wait.
1
Reactive Android Development
CS T & CS T Summer 2016
2
The Reactive Part
3
Definition: Reactive Any program that responds to input in real time
GUIs Embedded systems Contrast with 'batch' processing E.g. compiler This isn't anything new!!
4
FRP Functional Reactive Programming Born out of Haskell
No Side Effects -> No GUIs
5
Sodium FRP A Java implementation of the basic philosophy of FRP as originally defined by Conal Elliot guarantees "glitch freedom" is currently single threaded arguably a competitor to the Observer Pattern.
6
Reactive Extensions Born from Microsoft's LINQ
A 'Halfway' point between functional and imperative does not guarantee "glitch freedom" is multi-threaded It has been presented as a cleaner syntax for the observer pattern
7
The Android Part TracFone LG Lucky No Contract Phone
8
A collection of components
Activities One per screen in the app Services Run in the background Content Providers Manages shared app data Broadcast Receivers Handle messages from the system
9
Manifest XML file that describes all of the components that your app provides Lists the user permissions that your app requires It's best to ask for only those that you need Defines the minimum hardware and software versions required by the app. Etc.
10
Activities The logic behind the user-interface elements of the app
Only run when in the foreground Can be instantiated by a different app!
11
Services Run in the background
Even behind other apps! Should only be used if you wish for it to run in the background of other apps. Use threads for most blocking actions (I/O, computation, etc.) Can be instantiated by other apps!
12
Broadcast Receivers Receives notifications from other parts of the Android system Or even other apps Generally does very little work E.g. Activates a service to do the real processing.
13
Content Providers Generally used to manage data shared by many apps
E.g. The user's list of contacts Can also be used to store data that is private to the application
14
Intents All app components are produced in response to an Intent.
Two types Explicit Specifies a particular component to start by name Implicit Specifies a general action, but one of any number of components might fulfill it If several components can match an Intent, the user is prompted to specify which should be used.
15
Intent Filters Part of the manifest entry for each component
Used to advertise the services that a component can provide. Broadcast Receivers can have dynamic intent filters But all intent filters must be listed in the manifest
16
Activity Lifecycle
17
Resources Stored in the 'res' directory
Simplifies internationalization and support for multiple devices The 'R' class Automatically generated Provides access to resources defined in the 'res' directory
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.