Skip to content

Instantly share code, notes, and snippets.

@dwayne
Last active December 29, 2015 13:58
Show Gist options
  • Save dwayne/7680489 to your computer and use it in GitHub Desktop.
Save dwayne/7680489 to your computer and use it in GitHub Desktop.
Android application development.

Basics

The best guide for getting up to speed with Android Development that I've come across has to be the Getting Started Training Guide from the Android Developers website. There has to be better and low and behold I found this and this, i.e. How to Program for Android and Android Bootcamp Series 2012 Video Tutorial.

For beginners, the ADT (Android Developer Tools) Bundle is recommended for quickly starting Android development.

If you don't already have the JDK installed on your system you'd need to install it. For Ubuntu users, you can follow the instructions here.

Essentially:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java7-installer

For instructions about setting up your Android SDK for the first time, read Setting Up the ADT Bundle.

To access Android SDK tools from the command line, add this to your .bashrc.

# Android SDK
export ANDROID_HOME=path/to/sdk
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH

Next step: Follow along with the provided training material.

  • Go to the Settings menu and scroll down to About phone. Tap it.
  • Scroll down to the bottom again where you see build number.
  • Tap it 7 times and the Developer Options will appear on the Settings menu.

Resources

Using Git Version Control

See How to add Git Source Control to your existing Android Eclipse Project.

Note: Follow the instructions given but don't add the bin and gen directories to the repository. First remove them from the index if you added them. To do this right click on each one in turn and select Team > Untrack. Then add them to the .gitignore file. To do this right click on each one in turn and select Team > Ignore. This was already included in the video.

Resources

Just adding this in case I decide to use it in the future but I need to understand vanilla Android before I start adding extra layers of complexity into the workflow.

Requirements

  • Install the JDK if it's not on your system already
  • Install the Android SDK
  • Add the SDK to $ANDROID_HOME as an absolute path (Java does not expand tildes ~)
  • Add the SDK's tools/ and platform-tools/ directory to your $PATH

Ruby

Install jruby. You can use rvm.

$ rvm install jruby

Ruboto

$ gem install ruboto

Setup

You can easily check or install the requirements above:

$ ruboto setup

Read

The Android Stack

From top to bottom:

  • Applications
  • Application Framework
  • Libraries
  • Linux Kernel

Why Linux Kernel?

  1. Runs on many different devices. It's easily portable since the driver model is well known.
  2. Secure. We know quite a bit about its security model.
  3. Open Source.
  4. Cost.

Dalvik VM is Android's implementation of the Java VM.

Dalvik is optimized for mobile devices:

  • Battery consumption
  • CPU capabilities

Key differences:

  • Register based vs. stacked based
  • Dalvik runs .dex files
  • More efficient and compact implementation
  • Different set of Java libraries than JDK

Dalvik executable + Resources + Native Libraries = APK

Side loading = Putting APK on device

It is possible to create an internal application directory.

Resources

@dwayne
Copy link
Author

dwayne commented Jan 3, 2014

TODO: Check out Apache Cordova when I get a chance. It looks really promising.

@dwayne
Copy link
Author

dwayne commented Jan 7, 2014

@dwayne
Copy link
Author

dwayne commented Jan 16, 2014

Here's a neat course from Coursera I plan to take: Programming Mobile Applications for Android Handheld Systems

@dwayne
Copy link
Author

dwayne commented Jan 23, 2014

The Faster Android Emulator - Genymotion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment