Practical Android Java Development

Video Lectures

Displaying all 88 video lectures.
Lecture 1
Setup and Installation
Play Video
Setup and Installation
In this video we'll look at what free software to install on your computer to get started with Android development in the Java programming language.
Lecture 2
Creating an Emulator
Play Video
Creating an Emulator
A tutorial on how to create an emulator in Eclipse that you can use run your Android applications.
Lecture 3
Hello World
Play Video
Hello World
In this tutorial we'll finally create a simple "Hello World" Android program! Exciting!!! :)
Lecture 4
The EditText View
Play Video
The EditText View
A tutorial on using the EditText view in Android. In this tutorial we'll add an EditText to our basic Android program, so that we can type text into our Android device. We'll also begin to get into editing XML layouts.
Lecture 5
Buttons and LinearLayouts
Play Video
Buttons and LinearLayouts
This is a tutorial on adding button views to your Android programs. We'll also look at the highly-useful LinearLayout viewgroup, which enables us to lay out controls one after the other horizontally or vertically.
Lecture 6
Responding to Button Clicks
Play Video
Responding to Button Clicks
Once you've added a button to your Android layout ("viewgroup"), you can add some code that will be invoked when your button is clicked. I'll show you how in this tutorial.
Lecture 7
Debugging With DDMS and Logcat
Play Video
Debugging With DDMS and Logcat
In spite of the ferocious-sounding names, DDMS and logcat are very easy to work with and will help you double-check what's going on in your application. In this tutorial we'll use DDMS to double-check that our button click handler is working as expected.
Lecture 8
Saving Files to Internal Storage
Play Video
Saving Files to Internal Storage
There are various options for saving data in Android; search for "android storage options" in Google for more info. We'll be taking a look at some of them in this course, starting with saving files to internal storage in this tutorial.
Lecture 9
Reading Files from Internal Storage
Play Video
Reading Files from Internal Storage
Now that we've written a file to internal storage, in this tutorial we'll move on to reading it.
Lecture 10
String Resources
Play Video
String Resources
Lecture 11
Icons
Play Video
Icons
You can, and should, create a nice icon to launch your application with. There are a few little complications to creating graphics for phones, but we'll get the hardest bit out the way right here!
Lecture 12
Debugging on Your Phone
Play Video
Debugging on Your Phone
Lecture 13
Preferences
Play Video
Preferences
Preferences allow you to save small amounts of data -- single boolean values, integers and so on -- in such a way that the data persists between runs of your application.
Lecture 14
Toasts
Play Video
Toasts
Toasts are little dialogs which go away by themselves, enabling you to mention something to the user without being too annoying in the process.
Lecture 15
Adding a New Activity
Play Video
Adding a New Activity
Applications often consist of more than one activitiy. Here we'll create a second activity that we're going to use to display an image.
Lecture 16
Displaying Images
Play Video
Displaying Images
The ImageView view lets you display images.
Lecture 17
Getting Touch Coordinates
Play Video
Getting Touch Coordinates
You can use touch listeners to find out exactly where the user touches the screen.
Lecture 18
Alert Dialogs
Play Video
Alert Dialogs
If you really want a dialog and not a toast, you can have one. Here we use one to make sure the user has absolutely definitely read our information before proceeding.
Lecture 19
The Event Listener Pattern
Play Video
The Event Listener Pattern
While not Android-specific, I'll be using the Event-Listener pattern to simplify the code a little bit. We'll cover it here. If you only want to know Android-specific stuff, you can skip this tutorial. But if you want to increase your mastery of Java, stay tuned.
Lecture 20
Creating Databases
Play Video
Creating Databases
Android incorporates the SQLite database. Here we'll see how to create a database that your application can use to store data. I assume you know basic SQL for this tutorial, or else at least don't mind seeing a bit of SQL from time to time ...
Lecture 21
Inserting Database Values
Play Video
Inserting Database Values
Lecture 22
Retrieving Database Values
Play Video
Retrieving Database Values
Once we've covered retrieving values from our database, we'll finally be able to check that it actually works ....
Lecture 23
Asynchronous Tasks
Play Video
Asynchronous Tasks
Asynchronous tasks let you execute stuff in the background. If you have a task that takes up to a few seconds, it's best to execute it in the background rather than hold up your main application thread, freezing the interface. Note: if you have a task that takes more than a few seconds, you need to look into more general Java concurrency; check out my free tutorials on multithreading on www.caveofprogramming.com.
Lecture 24
Return Values from Asynchronous Task
Play Video
Return Values from Asynchronous Task
You can't update the main thread from the doInBackground method of an asynchronous task. So how can you return data from your processing? We'll look at that here.
Lecture 25
Supporting Different Screen Resolutions
Play Video
Supporting Different Screen Resolutions
You can declare the screen sizes your application supports in the manifest file, and indeed you should ....
Lecture 26
Intents and Launching Activities
Play Video
Intents and Launching Activities
To tell your phone to do something programmatically, you need to create an "intent". Here we'll use an intent to launch an activity.
Lecture 27
Nesting Viewgroup
Play Video
Nesting Viewgroup
You can nest ViewGroups to create quite complex layouts, although this isn't always the most efficient way to arrange your screen.
Lecture 28
Option Menus
Play Video
Option Menus
Lecture 29
Passing Data to Activities
Play Video
Passing Data to Activities
Often you want to start some activity and send it some data at the same time, perhaps instructing it to take some special action.
Lecture 30
Sub Activities
Play Video
Sub Activities
You can trigger an activity and return later to the activity you triggered it from. This is very useful for stuff like taking photos in your application, as well as about a million other things, so we'll take a look at it here.
Lecture 31
Taking a Photo
Play Video
Taking a Photo
Lecture 32
Saving Photos
Play Video
Saving Photos
How to save the photos you take and use them in your application, plus a first look at permissions in Android.
Lecture 33
List Views
Play Video
List Views
ListViews allow the user to choose between a bunch of different options. They're one of the commonest Android views, so well worth knowing.
Lecture 34
Dynamically Populating Lists
Play Video
Dynamically Populating Lists
You can populate your lists dynamically at runtime, rather than hardcoding values. We'll also look at retrieving string array resources in this tutorial.
Lecture 35
Formatting List Items
Play Video
Formatting List Items
Lecture 36
Using Icons in Lists
Play Video
Using Icons in Lists
Lecture 37
Styles and Themes
Play Video
Styles and Themes
You can take style information (fonts, colours, etc) out of your XML layouts and put them in separate stylesheets instead. That way you can more easily re-use a given style, and you can collect all style information together in one place. A style for an entire activity is known as a theme. In this tutorial we'll use styles to style our list demo.
Lecture 38
Selectors
Play Video
Selectors
Selectors are drawable items that change depending on your application state. We'll use color selectables here to change the color of list items temporarily when you click on them.
Lecture 39
RelativeLayout
Play Video
RelativeLayout
Relative layout is a very powerful ViewGroup that allows you to create complex arrangements of Views by positioning them relative to each other.
Lecture 40
Browsing the Gallery
Play Video
Browsing the Gallery
How to browse the gallery from your application by launching an appropriate sub-activity.
Lecture 41
Getting an Image from the Gallery
Play Video
Getting an Image from the Gallery
Once you've browsed the gallery and selected an image, you have to do a little work to convert the URI of the image to a file name ....
Lecture 42
The Activity Lifecycle and Saving Data
Play Video
The Activity Lifecycle and Saving Data
All activities have a "lifecycle", which you need to understand and can use to your advantage.
Lecture 43
Pre Publication Checks
Play Video
Pre Publication Checks
Some things you shouldn't forget to do before attempting to publish your app.
Lecture 44
Taking Screenshots of Your App
Play Video
Taking Screenshots of Your App
You can use DDMS to take screenshots of your application, which you can then use when you publish your app.
Lecture 45
Exporting and Signing Your App
Play Video
Exporting and Signing Your App
You need to sign your application by creating a digital certificate before you can publish it. In this tutorial we'll see how to create a digital certificate and export the app as an .apk file, signed with the certificate.
Lecture 46
Publishing Your Application
Play Video
Publishing Your Application
Once you've digitally signed and exported your app, it's easy to publish it --- although you do need to pay 25 USD for a developer account before you can publish apps. We'll look at the process here.
Lecture 47
Using 3rd Party APIs
Play Video
Using 3rd Party APIs
Lecture 48
ActionBars
Play Video
ActionBars
Action bars are those bars that appear at the top of the screen in Android 3.0 or greater. You can put icons, titles and menus in them. We'll take a good look at menus in this tutorial, as well as how to turn display of the titles and icons on and off.
Lecture 49
Downloading from the Internet
Play Video
Downloading from the Internet
In this tutorial we'll start to look at communication by taking the simplest case -- downloading textual data from the Internet.
Lecture 50
Internet Communication Overview
Play Video
Internet Communication Overview
Let's take a look at how phones can communicate with PCs, with the Internet and with each other. No code in this tutorial; it's just an overview.
Lecture 51
Creating a Server For Your Phone Apps
Play Video
Creating a Server For Your Phone Apps
In this tutorial we'll create a simple Java servlet program to act as an Internet server for our device to communicate with. You can find more about servlet programming at this url:

http://www.udemy.com/javawebtut/

The first seven videos are free and cover everything you need to know in detail to get a servlet up and running on the Internet. You could also use something like PHP or Ruby to get a server program up and running.
Lecture 52
Sending Small Amounts of Data to a Server
Play Video
Sending Small Amounts of Data to a Server
If you want to send small amounts of data to a server (e.g. an id) you can do it via a HTTP GET (in other words, in the URL).
Lecture 53
URL Encoding
Play Video
URL Encoding
If you want to send text to a server in a URL, you have to be careful to only send small amounts and you need to take care of special characters. We'll look at the latter here.
Lecture 54
Introducing JSON with Twitter and The Onion
Play Video
Introducing JSON with Twitter and The Onion
Let's take a look at an example of an existing JSON server. You can write your own JSON servers too, of course. JSON is an alternative to XML, and either option is a good way to protect a database while allowing people to connect to it in a controlled way.
Lecture 55
Parsing JSON
Play Video
Parsing JSON
Lecture 56
Formatting Data as JSON
Play Video
Formatting Data as JSON
Let's take a look at encoding data in the JSON format.
Lecture 57
Responding to Post Requests in a Servlet
Play Video
Responding to Post Requests in a Servlet
Lecture 58
Posting JSON Data to a Server
Play Video
Posting JSON Data to a Server
If you want to send a lot of data to a server, you'll want to send it via a POST request, not a GET. We'll look at how to POST text (JSON) data here.
Lecture 59
Introducing Fragments
Play Video
Introducing Fragments
Fragments are self-contained re-useable parts of activities. In this tutorial we'll create a simple example.
Lecture 60
List Fragments
Play Video
List Fragments
ListFragment is a specialised kind of fragment that makes displaying lists very easy. We'll take a look at it here.
Lecture 61
Formatting ListFragment Items
Play Video
Formatting ListFragment Items
It's pretty easy to format items in a list fragment (or anything else that uses ArrayAdapter to format items). Let's do it here, because these items are rather unsightly due to being unduly large.
Lecture 62
Fragment Communication Observer Pattern
Play Video
Fragment Communication Observer Pattern
The key to fragment communication is the Observer pattern, which old hands will recognise at once, while if you're relatively new to GUI programming, you may be left puzzled by it. In this tutorial we'll break it down into steps, and you'll most likely find that once you've typed out the steps yourself a few times, it'll start to really make sense.
Lecture 63
Managing Fragments
Play Video
Managing Fragments
You can replace one fragment with another, meaning we can do stuff like showing fragments side by side on a large screen, but replacing one with another in response to user interaction on a small screen. In this tutorial we'll look at how to use the fragment manager to replace one fragment with another.
Lecture 64
Games and Animation Introduction
Play Video
Games and Animation Introduction
Introducing frame-based animation in Android with a very simple game example.
Lecture 65
SurfaceView
Play Video
SurfaceView
By extending SurfaceView we can create a view that we can use for drawing on.
Lecture 66
POV Ray and Psyche
Play Video
POV Ray and Psyche
Just a quick note on the software I used to generate the elementary sound and graphics for this section of the tutorial.
Lecture 67
Drawing Bitmaps
Play Video
Drawing Bitmaps
Finally we can draw some images!
Lecture 68
Detecting Surface Changes
Play Video
Detecting Surface Changes
Our game is going to start up when the view surface is created, and stop (or pause) when the drawing surface is destroyed; so for that we need to know how to detect surface creation and destruction events.
Lecture 69
The Game Loop Thread
Play Video
The Game Loop Thread
In this tutorial we'll set up a separate thread that will tell our game when to update and draw itself. It'll contain the "game loop" that's at the hard of all serious animation projects.
Lecture 70
The Game Class
Play Video
The Game Class
In this tutorial we'll create a game class that basically will manage the various entities that will compose our game, drawing them and updating them.
Lecture 71
Sprites
Play Video
Sprites
Let's create a class that can represent a sprite (an entity that visually appears in our game). We'll get it drawing something in this tutorial; then we can use it as a base class for specific game entities in future.
Lecture 72
Animating the Sprite
Play Video
Animating the Sprite
In this tutorial we'll make our first sprite actually move.
Lecture 73
Bouncing a Ball
Play Video
Bouncing a Ball
Lecture 74
Bring Out the Gimp Autocropping
Play Video
Bring Out the Gimp Autocropping
In this tutorial I'm just going to show you a little bit of code I added to enable me to position the shadow relative to the main image. We'll also take a quick look at auto-cropping in GIMP.
Lecture 75
Adding the Bats
Play Video
Adding the Bats
In this tutorial we'll add a couple of bats to our game. They won't hit the ball or move yet, but at least they'll be there.
Lecture 76
Randomizing the Ball
Play Video
Randomizing the Ball
Let's use the standard Random class to randomise the direction of the ball when the game starts.
Lecture 77
Controlling the Player's Bat
Play Video
Controlling the Player's Bat
By handling touch events we can control the player's bat, taking a big step towards turning this from an animation into a game.
Lecture 78
Adding Intelligence
Play Video
Adding Intelligence
In this tutorial we'll add a simple random algorithm to control the opponent's bat, giving a sort of vague appearance of a deranged hyperactive intelligence.
Lecture 79
Collision Detection
Play Video
Collision Detection
Once we've added some collision detection, making good use of Rect.contains(), we can get the ball to bounce off the bats.
Lecture 80
Drawing Text
Play Video
Drawing Text
It's useful to be able to draw text in games, either to display an entire status screen, or just to show the score.
Lecture 81
Game States
Play Video
Game States
In this tutorial we add states to our game, so that it can be paused vs running, won or lost etc.
Lecture 82
Playing a Sound
Play Video
Playing a Sound
It's time to add sound to our game! In this tutorial we'll look at playing sounds in Android.
Lecture 83
Playing Multiple Sounds
Play Video
Playing Multiple Sounds
In this tutorial we'll look at an efficient way of playing multiple sounds.
Lecture 84
Controlling the Volume
Play Video
Controlling the Volume
Now we can add the finishing touch to our game by allowing the user to adjust the volume, without which our game would be rather annoying.
Lecture 85
Installing Google Play Services
Play Video
Installing Google Play Services
The first step to creating a maps V2 application is installing Google Play Services and creating a library project.
Lecture 86
Registering the Debug Key
Play Video
Registering the Debug Key
Creating and signing a basic application; we'll leave actually getting it working for the next tutorial!
Lecture 87
Adding Markers to Maps
Play Video
Adding Markers to Maps
This is a tutorial on adding markers to maps and making them clickable. Well if I'm honest, it's me blundering through the documentation to figure out how to do this. Hopefully it's entertaining :) It's good to see that Google have simplified this a lot since the last API version.
Lecture 88
Getting the Demo Map App Running
Play Video
Getting the Demo Map App Running
Finally we can get the map demo up and running and actually see a map, if we're lucky.