Learning Kotlin by building Android Applications

Author: Eunice Adutwumwaa Obugyei   Natarajan Raman  

Publisher: Packt Publishing‎

Publication year: 2018

E-ISBN: 9781788471497

P-ISBN(Paperback): 89543100215750

Subject: TP312 程序语言、算法语言

Language: ENG

Access to resources Favorite

Disclaimer: Any content in publications that violate the sovereignty, the constitution or regulations of the PRC is not accepted or approved by CNPIEC.

Learning Kotlin by building Android Applications

Chapter

Java

Installing the JDK

Android Studio

Installing Android Studio

Getting Android Studio ready

Creating your first Android project

Choosing an SDK

Building your project

Gradle

Parts of an Android project

Running your app

The Android emulator

Creating an Android emulator

Running from an emulator

Running on an actual device

Summary

Chapter 2: Configuring Your Environment for Kotlin

Installing the Kotlin plugin

Making our project Kotlin-ready

Kotlin alongside Java?

Kotlin to Java?

Summary

Chapter 3: Data Types, Variables, and Constants

The user interface

Building our game UI

Basic types

Variables and constants

Properties

Summary

Chapter 4: Classes and Objects

Structure of a class

Constructors

Data classes

Objects

Summary

Chapter 5: Type Checks and Null Safety

Null safety

Nullable and non-nullable types

Safe call operator

The Elvis operator

The !! operator

Type checks

Cast operator

Summary

Chapter 6: Functions and Lambdas

Functions

Parameters

Higher–order functions and lambdas

Lambda expressions

Implementing a game status check

Summary

Chapter 7: Developing Your Location-Based Alarm

Creating a project

Generation of a Google Maps API key

Running the app

Understanding the code

Customizing the code

Finding the Lat and Lng of a place

The XML layout

Developing a screen for user input

The AndroidManifest file

Build.gradle

Summary

Chapter 8: Working with Google's Location Services

Integrating shared preferences

Adding permissions

Integration of the location API

Classes and variables

The Google API client

Matching the location

Summary

Chapter 9: Connecting the Outside World – Networking

Network connectivity

Manifest permissions

Volley library

Sync adapter

Third-party libraries

Picasso

User interface – XML

build.gradle

Kotlin code

Manifest permissions

Glide

build.gradle 

Kotlin code

Summary

Chapter 10: Developing a Simple To-Do List App

Creating the project

Building your UI

Using the Android Studio layout editor

Adding functionality to the user interface 

Adding a new task

Displaying data in the ListView

Updating/deleting a Todo item

Adding a menu

Summary

Chapter 11: Persisting with Databases

Introduction to databases

Relational databases

Using SQLite

Inserting data into the database

Retrieving data from the database

Updating a task

Deleting a task

ORM libraries

Retrieving data from the database

Inserting data into the database

Updating a task

Deleting a task

Non-relational databases

Summary

Chapter 12: Setting Reminders for Tasks

AlarmManager

Creating the alarm

Starting the reminder dialog

BroadcastReceiver

Sending broadcasts

Creating a broadcast receiver

Creating the AlarmService

Creating an IntentService

Firebase Cloud Messaging

Integrating FCM

Summary

Chapter 13: Testing and Continuous Integration

Testing

Importance of testing

Android Testing Support Library

Model-View-Presenter architecture

Test-Driven Development

Functional versus non-functional testing

Notes app

Test dependencies

Your first test

Crashlytics

Connect

Stages of testing

Alpha testing

Beta testing

Setting up for beta testing

Creating the beta test track

The opt-in URL

Continuous integration

Definition

Tools

Installing fastlane

Summary

Chapter 14: Making Your App Available to the World

Key store generation

Key store generation through Android Studio

Auto signing the APK through Android Studio

Build types and flavors

Key store generation through the command line

Publishing the app in Google Play Store

App release section

Store listing section

Content rating section

Pricing and distribution section

Publishing the app in Amazon Appstore

General information

Availability & Pricing section

Description section

Images & Multimedia section

Content Rating section

Binary File(s) section

Summary

Chapter 15: Building an App Using the Google Faces API

Introduction to Mobile Vision

Faces API concepts

Getting started – detecting faces

Creating the FunyFace project

Loading the image

Creating a Paint instance

Creating a canvas

Creating the face detector

Detecting the faces

Drawing rectangles on the faces

Results

Summary

Other Books You May Enjoy

Index

The users who browse this book also browse