Home Tutorials

Tutorials

Hands-on experience with Android

Peeking Droid

AA AppsWhere appropriate, the tutorials come with the source, javadoc documentation, project settings for Eclipse and the Android installable APK files for download. You'll also find them in the Android Market - just search for "Android Academy". This is done because some carriers only allow apps to be installed from the market, to enable alerts when there are updates and to allow the Market to filter out apps which won't run on incompatible handsets.

The projects use the Eclipse IDE. Since they all follow the standard Android layout they shouldn't be too difficult to use in other development environments.

If you are browsing now on an Android device you can install the Apps directly by selecting the download APK link and following your devices instructions. Note your handset may be set to disallow apps from non-market locations to be installed, so ensure Settings | Applications | "Unknown sources" is enabled.

Please feel free to use the comments feature for any tips, questions or feedback.

 

 
TwitterWidget Micro Thumnail
TwitterWidget
Skill 8 Skill: Advanced
How to write a Widget which sends tweets using OAuth for authentication.

 
33x50-buildinfo
BuildInfo
Skill 4 Skill: Medium
Tool: How to access enhanced build info without requiring unnecessary user permissions.

 
33x50-themes-and-styles
Themes and Styles
Skill 5 Skill: Medium
How to use Androids Theme system to change all your UI at once.

 
33x50-sensorplayer
SensorPlayer
Skill 8 Skill: Advanced
Tool: A framework to record and playback sensor (orientation, accelerometer) events.

 
33x50-coolsplash
CoolSplash
Skill 5 Skill: Medium
Splash screen animator and toy - also shows Preferences usage

FlexiMaze
FlexiMaze
Skill 7 Skill: Advanced
Shows techniques for dynamic device-independent scaling and content input from XML

HumbleCalc
HumbleCalc
Skill 5 Skill: Medium
Illustrates automated unit testing of the Android UI

SensorArrow
Sensor arrow
Skill 5 Skill: Medium
Shows realtime tilt/direction plus android emulator accelerometer use with the sensor simulator

SignDocRelease
Sign, Doc & Release
Skill 1 Skill: Novice
Guide to signing apk files, documenting with Android javadoc and archiving your project

Logging
Android logging
Skill 2 Skill: Beginner
How to set up Eclipse for Android logging

Wash your hands!
Wash your hands!
Skill 2 Skill: Beginner
Basic graphics and event handling

Debugging
Debugging with Eclipse
Skill 2 Skill: Beginner
Shows how to debug with Eclipse

Threading1
Threading with Android - part 1
Skill 5 Skill: Medium
Basic threading - updates screen in reponse to finger presses

Threading2
Threading with Android - part 2
Skill 5 Skill: Medium
Builds on part 1 to show continous screen updates

Threading3
Threading with Android - part 3
Skill 7 Skill: Advanced
More complex example showing several threads controlling different screen objects

MessageQueue
The Android Message Queue
Skill 5 Skill: Medium
Illustrates the Message Queue by updating objects on the screen
 

 

TwitterWidget: How to write an Android widget which tweets
Written by Carl Whalley   
Friday, 18 March 2011 14:30

Andoid cool splashOne of the coolest things about Android is the use of Widgets - the small "mini-apps" you add to your homescreen to get immediate information and functionality, often without even having to launch an app. Think of the weather ones, the fancy clocks, the stock price reporters or the RSS news feeds for example - they all update their displays without the user doing anything. There's clearly some magic going on behind the scenes here which may appear mysterious to the typical "app only" Android coder. 

Twitter recently dropped their REST API which meant developers had to adopt one of the new authentication methods to use their services. So, here's a combination of the two - a Widget which just sends tweets using the new OAuth Twitter API.

Joomla Templates and Joomla Extensions by JoomlaVision.Com
 
Nexus S emulator skin
Wednesday, 12 January 2011 20:43
Nexus S Skin

When Google releases a new SDK it intentionally does not provide skins for any particular handset models. This is to emphasise the fact you are writing for a platform, one which has many particular implementations. However, it's really nice to have a skin for a handset you are interested in if for no other reason than to reassure yourself your app really does look good on it!

For a while there was no Nexus One skin, and then Tim Hoeck added one to his blog. Following the recent release of the Android 2.3 (Gingerbread) SDK it was proving a little tricky to find one for the Nexus S, so we present ours here along with the steps needed to start making use of it. Together with the Gingerbread SDK, this amounts to a free (virtual) Nexus S!

Joomla Templates and Joomla Extensions by JoomlaVision.Com
 
BuildInfo: Get more info at buildtime
Written by Carl Whalley   
Sunday, 09 January 2011 08:10

BuildInfo A funny thing happened when I wrote my last app. This was a basic, local data-driven logging system which was entirely self contained. Some of the testers reported something odd - it asked for the permission to make phone calls on installation. Since I knew there was nothing in the app which did that, and I'd only added the android.permission.INTERNET requirement to the manifest, I knew I had to get rid of this warning. In this security-conscious climate, any app which asks for something so far out of whack with its obvious purpose probably isn't going to be installed, and all that hard work will have been for nothing. So what gives? The answer was rather subtle, and in solving it I came up with a useful tool which went beyond the original problem I was tackling, so I thought I'd document it here in case anyone else runs into it.

Joomla Templates and Joomla Extensions by JoomlaVision.Com
 
Using Themes and Styles in Android
Written by Martin Moore   
Friday, 07 January 2011 00:00

Andoid themes and stylesThe Android SDK comes complete with impressive options to customise the appearance of its standard UI components. This technique can give your applications a polished and professional look without having to rely on custom drawing code. Your app can be instantly skinned with a makeover which changes every part of its appearance. This isn't just for cosmetic reasons either - skinning can greatly assist internationalisation, or how about support for high-contrast UI's for the visually impaired. This is achieved using Androids Themes component - it's explained in detail by Google here. This article gives a quick feel for the powerful Themes techniques Android provides, with a few tips on real-world use along the way.

 

Joomla Templates and Joomla Extensions by JoomlaVision.Com
 
SensorPlayer: Record and play back sensor events
Tuesday, 03 November 2009 20:35

Andoid cool splashWhen developing apps which use the sensors, the more realistic the environment for testiing the better. The earlier SensorArrow tutorial showed how to create an app which uses the OpenIntents simulator to let you send events via a wireframe handset representation. This is great, and extremely useful in many situations, but it has some drawbacks. To complement it we present the SensorPlayer, an app to record and sensor movements from your physical device and replay them either back there or on the emulator.

Joomla Templates and Joomla Extensions by JoomlaVision.Com
 
«Start Prev 12 Next End»

Page 1 of 2
Portions are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. Android Academy is independent from Google. All trademarks acknowledged.
 
Glossary
We have 26 guests online