Android Programming

Android Programming

"Android Programming" е практически курс, който бързо и лесно ще ви научи да създавате богати и многофункционални Android приложения.

Всеки от вас по време на обучението ще разработи следните приложения – GeoQuiz, CriminalIntent, HelloMoon, NerdLauncher Building, RemoteControl, PhotoGallery , DragAndDraw, RunTracker.

По време на обучението ще се занимаваме с:

- Създаване на интуитивен, надежден софтуер използвайки активити-та (activities), сървиси (services) и intents;
- Изграждане на атрактивен потребителски интерфейс за голям набор от телефони и таблети;
- Управление на данни чрез доставчици на данни и SQLite база от данни;
- Интегриране на приложения с уеб и локални сървиси;
- Използване на фрагменти за създаване на графичен интерфейс;
- Ползване на камера, медия и локализация.

Приложенията, по които ще работите са:

- GeoQuiz - ще се запознаете с основите на Android проектите, активити-та, подредбата на компонентите и explicit intents;
- CriminalIntent - най-голямото приложение в модула. То ви дава възможност да отбелязвате неудачите на вашите колеги в офиса. Ще се научите да използвате фрагменти, master-detail интерфейси, - list-backed интерфейси, менюта, камера, implicit intents и други;
- HelloMoon - малък почит към мисията Apollo - ще научите повече за фрагментите, работата с ресурси, медия и локализация;
- NerdLauncher Building - ще придобиете представа за intent системата;
- RemoteControl - ще използвате styles, state list drawables и други за създаване на атрактивен потребителски интерфейс;
- PhotoGallery - Flickr клиент, който сваля и показва снимки от Flickr. Ще се запознаете със сървиси, мултитрединг, достъп до уеб сървиси и други;
- DragAndDraw - в това приложение за рисуване ще се научите да прихващате събития и да създавате изгледи;
- RunTracker - ще проследите вашето движение през града и ще го отразите на картата. Ще се научите как да използвате локация, SQLite база данни и карти.

Курсът е предназначен за хора с знания по Java, ООП, нишки, събития, изключения, бази данни и колекции. За придобиване или опресняване на знанията ви в тази област ви препоръчваме първо да преминете курс "Въведение в програмирането с Java" и "Java Fundamentals".
Цена на курса: по запитване.

За да получите повече информация и/или да се запишете свържете се с нас на тел.: 02/958 9965 и nadia@ontarget.bg

1. Your First Android Application

App Basics

Creating an Android Project

Navigating in Android Studio

Laying Out the User Interface

    The view hierarchy

    Widget attributes

    Creating string resources

    Previewing the layout

From Layout XML to View Objects

    Resources and resource IDs

Wiring Up Widgets

    Getting references to widgets

    Setting listeners

Running on the Emulator

For the More Curious: Android Build Process

2. Android and Model-View-Controller

Creating a New Class

    Generating getters and setters

Model-View-Controller and Android

Updating the View Layer

Updating the Controller Layer

Running on a Device

Adding an Icon

    Adding resources to a project

    Referencing resources in XML

Challenges

Challenge: Add a Listener to the TextView

Challenge: Add a Previous Button

Challenge: From Button to ImageButton

3. The Activity Lifecycle

Logging the Activity Lifecycle

    Making log messages

    Using LogCat

Rotation and the Activity Lifecycle

    Device configurations and alternative resources

Saving Data Across Rotation

    Overriding onSaveInstanceState(Bundle)

The Activity Lifecycle, Revisited

For the More Curious: Testing onSaveInstanceState(Bundle)

For the More Curious: Logging Levels and Methods

4. Debugging Android Apps

Exceptions and Stack Traces

    Diagnosing misbehaviors

    Logging stack traces

    Setting breakpoints

    Using exception breakpoints

Android-Specific Debugging

    Using Android Lint

    Issues with the R class

5. Your Second Activity

Setting Up a Second Activity

    Creating a new activity

    A new activity subclass

    Declaring activities in the manifest

    Adding a Cheat! button to QuizActivity

Starting an Activity

    Communicating with intents

Passing Data Between Activities

    Using intent extras

    Getting a result back from a child activity

How Android Sees Your Activities

Challenge

6. Android SDK Versions and Compatibility

Android SDK Versions

Compatibility and Android Programming

    A sane minimum

    Minimum SDK version

    Target SDK version

    Compile SDK version

    Adding code from later APIs safely

Using the Android Developer Documentation

Challenge: Reporting the Build Version

7. UI Fragments and the Fragment Manager

The Need for UI Flexibility

Introducing Fragments

Starting CriminalIntent

    Creating a new project

    Fragments and the support library

    Adding dependencies in Android Studio

    Creating the Crime class

Hosting a UI Fragment

    The fragment lifecycle

    Two approaches to hosting

    Defining a container view

Creating a UI Fragment

    Defining CrimeFragment’s layout

    Creating the CrimeFragment class

Adding a UI Fragment to the FragmentManager

    Fragment transactions

    The FragmentManager and the fragment lifecycle

Application Architecture with Fragments

    The reason all our activities will use fragments

For the More Curious: Why Support Fragments are Superior

For the More Curious: Using Built-In Fragments

8. Creating User Interfaces with Layouts and Widgets

Upgrading Crime

Updating the Layout

Wiring Widgets

More on XML Layout Attributes

    Styles, themes, and theme attributes

    Screen pixel densities and dp and sp

    Android’s design guidelines

    Layout parameters

    Margins vs. padding

Using the Graphical Layout Tool

    Creating a landscape layout

    Adding a new widget

    Editing attributes in properties view

    Reorganizing widgets in the component tree

    Updating child layout parameters

    How android:layout_weight works

    The graphical layout tool and you

    Widget IDs and multiple layouts

Challenge: Formatting the Date

9. Displaying Lists with RecyclerView

Updating CriminalIntent’s Model Layer

    Singletons and centralized data storage

An Abstract Activity for Hosting a Fragment

    A generic fragment-hosting layout

    An abstract Activity class

RecyclerView, Adapter, and ViewHolder

    ViewHolders and Adapters

    Using a RecyclerView

    Implementing an Adapter and ViewHolder

Customizing List Items

    Creating the list item layout

    Using a custom item view

Responding to Presses

For the More Curious: ListView and GridView

For the More Curious: Singletons

10. Using Fragment Arguments

Starting an Activity from a Fragment

    Putting an extra

    Retrieving an extra

    Updating CrimeFragment’s view with Crime data

    The downside to direct retrieval

Fragment Arguments

    Attaching arguments to a fragment

    etrieving arguments

Reloading the List

Getting Results with Fragments

Challenge: Efficient RecyclerView Reloading

For the More Curious: Why Use Fragment Arguments?

11. Using ViewPager

Creating CrimePagerActivity

    ViewPager and PagerAdapter

    Integrating CrimePagerActivity

FragmentStatePagerAdapter vs. FragmentPagerAdapter

For the More Curious: How ViewPager Really Works

For the More Curious: Laying Out Views in Code

12. Dialogs

The AppCompat Library

Creating a DialogFragment

    Showing a DialogFragment

    Setting a dialog’s contents

Passing Data Between Two Fragments

    Passing data to DatePickerFragment

    Returning data to CrimeFragment

Challenge: More Dialogs

Challenge: A Responsive DialogFragment

13. The Toolbar

AppCompat

    Using the AppCompat library

Menus

    Defining a menu in XML

    Creating the menu

    Responding to menu selections

Enabling Hierarchical Navigation

    How hierarchical navigation works

An Alternative Action Item

    Toggling the action item title

    "Just one more thing..."

For the More Curious: Toolbar vs Action Bar

Challenge: Deleting Crimes

Challenge: Plural String Resources

Challenge: An Empty View for the RecyclerView

14. SQLite Databases

Defining a Schema

Building Your Initial Database

    Debugging database issues

Gutting CrimeLab

Writing to the Database

    Using ContentValues

    Inserting and updating rows

Reading from the Database

    Using a CursorWrapper

    Converting to model objects

For the More Curious: More Databases

For the More Curious: The Application Context

Challenge: Deleting Crimes

15. Implicit Intents

Adding Buttons

Adding a Suspect to the Model Layer

Using a Format String

Using Implicit Intents

    Parts of an implicit intent

    Sending a crime report

    Asking Android for a contact

    Checking for responding activities

Challenge: ShareCompat

Challenge: Another Implicit Intent

16. Taking Pictures with Intents

A Place for Your Photo

    Including layout files

External Storage

    Designating a picture location

Using a Camera Intent

    External storage permission

    Firing the intent

Scaling and Displaying Bitmaps

Declaring Features

For the More Curious: Using Includes

Challenge: Detail Display

Challenge: Efficient Thumbnail Load

17. Two-Pane Master-Detail Interfaces

Adding Layout Flexibility

    Modifying SingleFragmentActivity

    Creating a layout with two fragment containers

    Using an alias resource

    Creating tablet alternatives

Activity: Fragment Boss

    Fragment callback interfaces

For the More Curious: More on Determining Device Size

18. Assets

Why Assets, Not Resources

Creating BeatBox

Importing Assets

Getting at Assets

Wiring Up Assets for Use

Accessing Assets

For the More Curious: Non-Assets?

19. Audio Playback with SoundPool

Creating a SoundPool

Loading Sounds

Playing Sounds

Unloading Sounds

Rotation and Object Continuity

    Retaining a fragment

    Rotation and retained fragments

For the More Curious: Whether to Retain

For the More Curious: More on Rotation Handling

20. Styles and Themes

Color Resources

Styles

    Style inheritance

Themes

Modifying the theme

Adding Theme Colors

Overriding Theme Attributes

    Theme spelunking

Modifying Button Attributes

For the More Curious: More on Style Inheritance

For the More Curious: Accessing Theme Attributes

Challenge: An Appropriate Base Theme

21. XML Drawables

Making Uniform Buttons

Shape Drawables

State List Drawables

Layer List Drawables

For the More Curious: Why Bother with XML Drawables?

For the More Curious: 9-Patch Images

For the More Curious: Mipmap Images

22. More About Intents and Tasks

Setting Up NerdLauncher

Resolving an Implicit Intent

Creating Explicit Intents at Runtime

Tasks and the Back Stack

    Switching between tasks

    Starting a new task

Using NerdLauncher as a Home Screen

Challenge: Icons

For the More Curious: Processes vs. Tasks

For the More Curious: Concurrent Documents

23. HTTP & Background Tasks

Creating PhotoGallery

Networking Basics

    Asking permission to network

Using AsyncTask to Run on a Background Thread

You and Your Main Thread

    Beyond the main thread

Fetching JSON from Flickr

    Parsing JSON text

From AsyncTask Back to the Main Thread

Cleaning Up AsyncTasks

For the More Curious: More on AsyncTask

For the More Curious: Alternatives to AsyncTask

Challenge: Gson

Challenge: Paging

Challenge: Dynamically Adjusting the Number of Columns

24. Loopers, Handlers, and HandlerThread

Preparing RecyclerView to Display Images

Downloading Lots of Small Things

Communicating with the Main Thread

Assembling a Background Thread

Messages and Message Handlers

    Message anatomy

    Handler anatomy

    Using handlers

    Passing handlers

For the More Curious: AsyncTask vs. Threads

Challenge: Preloading and Caching

For the More Curious: Solving the Image Downloading Problem

25. Search

Searching Flickr

Using SearchView

    Responding to SearchView user interactions

Simple Persistence with Shared Preferences

Polishing Your App

Challenge: Polishing Your App Some More

26. Background Services

Creating an IntentService

What Services are For

    Safe background networking

Looking for New Results

Delayed Execution with AlarmManager

    Being a good citizen: using alarms the right way

    PendingIntent

    Managing alarms with PendingIntent

Controlling Your Alarm

Notifications

Challenge: Notifications on Android Wear

For the More Curious: Service Details

    What a service does (and does not) do

    A service’s lifecycle

    Non-sticky services

    Sticky services

    Bound services

For the More Curious: JobScheduler and JobServices

For the More Curious: Sync Adapters

Challenge: Using JobService on Lollipop

27. Broadcast Intents

Regular Intents vs. Broadcast Intents

Receiving a System Broadcast: Waking Up on Boot

    Creating and registering a standalone receiver

    Using receivers

Filtering Foreground Notifications

    Sending broadcast intents

    Creating and registering a dynamic receiver

    Limiting broadcasts to your app using private permissions

    Passing and receiving data with ordered broadcasts

Receivers and Long-Running Tasks

For the More Curious: Local Events

    Using EventBus

    Using RxJava

For the More Curious: Detecting the Visibility of Your Fragment

28. Browsing the Web and WebView

One Last Bit of Flickr Data

The Easy Way: Implicit Intents

The Harder Way: WebView

    Using WebChromeClient to spruce things up

Proper Rotation with WebView

    Dangers of handling configuration changes

For the More Curious: Injecting JavaScript Objects

For the More Curious: KitKat’s WebView Overhaul

Challenge: Using the Back Button for Browser History

Challenge: Supporting Non-HTTP Links

29. Custom Views and Touch Events

Setting Up the DragAndDraw Project

    Setting up DragAndDrawActivity

    Setting up DragAndDrawFragment

Creating a Custom View

    Creating BoxDrawingView

Handling Touch Events

    Tracking across motion events

Rendering Inside onDraw(…)

Challenge: Saving State

Challenge: Rotating Boxes

30. Property Animation

Building the Scene

Simple Property Animation

    View transformation properties

    Using different interpolators

    Color evaluation

Playing Animators Together

For the More Curious: Other Animation APIs

    Legacy animation tools

    Transitions

Challenges

31. Locations and Play Services

Locations and Libraries

    Google Play Services

Creating Locatr

Play Services and Location Testing on Emulators

    Mock location data

Building out Locatr

Setting Up Google Play Services

    Location permissions

Using Google Play Services

Flickr Geosearch

Getting a Location Fix

Find and Display an Image

Challenge: Progress

32. Maps

Importing Play Services Maps

Mapping on Android

Maps API Setup

    Getting a Maps API Key

Setting Up Your Map

Getting More Location Data

Working with Your Map

    Drawing on the map

For the More Curious: Teams and API Keys

33. Material Design

Material Surfaces

    Elevation and Z values

    State list animators

Animation Tools

    Circular reveal

    Shared element transitions

View Components

    Cards

    Floating action buttons

    Snackbars

More on Material Design