Coursera: Android – Tips

A collection of what I find useful in our Android class.  Feel free to leave comments.  Thanks…

Android Blog   |    adb   |   aapt   |   App’s Workflow

 avd   |   Eclipse Refactor   |   Eclipse Preview   |   Import Android Project

DOS Tab   |   DOS Explorer   ||    Java Version   |    HAXM   |    Hardware Connection

Phonegap   |   Eclipse Run Config

adb (Android Debug Bridge) – Installing APK to AVD (Android Virtual Device)    |   ^ Go top
Alternative adb install:


aapt (Android Asset Packaging Tool) – Check APKs permission    |   ^ Go top

I have created a thread about aapt and adb, available in this thread:
To check for permission as in above screenshot:
aapt d permissions xyz.apk

Checking permission could also be done through the AVD.
Go to [Apps], [Settings], [Apps] and select app to check.
On “App Info”, scroll down check if there’s any “PERMISSIONS”.

Android App’s Workflow (My understanding so far)   |   ^ Go top

  1. Manifest.xml is read by installer, icon(s) added accordingly to Android’s HOME.
    Each “LAUNCHER” category in manifest creates an icon in HOME.
  2. Icon launches the app according to specified “<activity android:name…>”, by default named MainActivity (a Java file).
  3. MainActivity as specified in its  setContentView, loads layout (by default “activity_main”, an XML file).
  4. Layout is displayed on the device and control goes back to MainActivity class .

avd (Android Virtual Devices)   |   ^ Go top

  • To change orientation from/to portrait/landcape, use [Ctrl]+[F12]
  • To scroll, use drag and drop (Home/Apps screens scroll only horizontally)
    Apps screen is alphabetical and can’t be re-arranged
  • To enable screen capture, activate “Snapshot” and “Save to snapshot” options
    image_thumb6 image_thumb4

Eclipse String Refactor    |   ^ Go top
Convert hardcoded string into XML value.


Eclipse Preview All Screen    |   ^ Go top
To see layout in all screen sizes


Eclipse Import Android Project    |   ^ Go top
To import copied/zipped Android project:

  1. From Eclipse, select “File”, “Import…”
  2. From Import dialog, select “General”, “Existing Projects into Workspace”
  3. Click [Browse] from “Select root directory”
  4. Click the folder that contains the “AndroidManifest.xml” and click the [OK] button
  5. Back to the “Import” dialog, click the [Finish] button and the project will be added.

DOS Scroll Tab – On DOS Prompt, after a command and space, press [Tab] to view subfolders.     |   ^ Go top

DOS Prompt from Explorer    |   ^ Go top
To open command prompt window in the active folder, in Windows Explorer press [Shift]+[Right-Click]


Java Version – Getting version of installed Java:    |   ^ Go top


Intel HAXM –   Hardware Accelerated Execution Manager   |   ^ Go top

DOS Commands: sc query intelhaxm, sc stop intelhaxm, sc start intelhaxm
Uninstallation: Run the file and activate the “Remove” option
Installation: Run the latest HAXM file that is the hotfix
Hotfix is a new install that’s neither just an add-on nor an update
The latest version as of this writing is 1.0.7:


Self Evaluation   |   ^ Go top
This is new to me, hardly noticed this.
Was surprised to see I was able to grade myself when [Go on to self-evaluation] was clicked.


Hardware Connection   |   ^ Go top

Connecting mobile device to Eclipse:

  1. Activate USB Debugging
    • Tap Apps, Settings, Developer Options
    • Tap USB debugging so it’ll be checked
  2. Load Eclipse and select PC Software
    • Connect device by USB cable to the computer running Eclipse
    • The device will show “USB connection type” selection, tap the “PC software” option
      W8-USBtap_thumb1 W8-USBaction_thumb
    • The computer will show “Select action”, just disregard
    • Check the Eclipse, [Device] tab should show the hardware with name automatically assigned

PhoneGap   |   ^ Go top

Creating HTML5, CSS, Javascript apps for both Android and iOS.

Eclipse Run Config   |   ^ Go top

I once imported an Android project that automatically launches AVD.  Not knowing Run Config that time, I thought there’s something wrong.  Came across an ebook showing Run Config.  In short, you can simply assign following to be automatically run from Android project:

  • Activity (Wondering what happens when this conflicts with the project itself)
  • Target AVD/Mobile Device
  • Etc…



Eclipse Project Naming   |   ^ Go top


Activity, Layout, Menu have naming convention.  For the above sample, menu would be main.xml.

  • Activity Name: OtherActivity
  • Layout Name: activity_other
  • Menu Name: other

Clean and beautiful ads:


3 thoughts on “Coursera: Android – Tips

  1. Great post. I used to be checking continuously this blog and I am impressed!
    Extremely useful information specifically the last part :) I look
    after such information a lot. I was seeking
    this particular info for a long time. Thank you and
    have a great time.

    • Thanks Dorsey,
      You sure are a genius in finding that article as myself have difficulty finding it :)
      Sure are lots of notes in there, useful to me when I was taking that course.
      Bit outdated now but I guess still useful.
      I plan to later make those notes easier to find, update as well with latest Android release.
      I’ve just added following tags to the article: coursera, mooc, android.
      Happy Holidays,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s