No Photoshop Required For Making Android App Icons

Stumbled upon a very cool open source project called Android Asset Studio takes your high-res images (jpg/png) and will generate the ldpi,mdpi,xhdpi versions of it.

It also does a lot of other mundane tasks relating to generating icons.

Very handy for multiple Android device deployment and it’s free!

Link: Android Asset Studio
Source: Android Developers: Customizing the Action Bar

Share

Alpha Demo of Android Stylus-based Weekly Planner for Lenovo ThinkPad Tablet

This past week I’ve been developing an intimate relationship with Android’s View and ViewGroup APIs. Flash Player’s Display Object hierarchy got it right. So I figured this would be a walk in the park. I was totally wrong. It was such a b!tch to work with. Android devs know it’s platform full of inheritance and a lot of hooks, none of which you will know unless you RTFM. Anyways, here’s a bit of the aftermath…

The app is not really for the masses but for those of us who are Android stylus adopters.

Share

Android SDK Reference Search Chrome Extension


This might be old news to others but news to me today. I’ve used a similar search for AS3 documentation for a while now. Just occurred to me today I ought to google something similar.

You can install the Chrome extension here.

The extension adds new functionality to the Chrome Omnibox (aka address box). Typing ‘ad ‘ followed by the first few letters of a class name will bring up all matching class names in the Android SDK, allowing you to choose an item and navigate directly to the relevant Android SDK Reference URL on developer.android.com. Nifty.

Source:
http://android.modaco.com/page/news/_/android/developers-android-sdk-reference-search-r160

Share

Distinguishing Touch Event vs. Digitizer Pen Input On Lenovo Thinkpad Tablet

I had a question on StackOverflow that went unanswered. I spent much of the day charting a good part of Volker Braun’s Quill for Android Open Source project looking for that answer. Many of the API’s I was not familiar so I took lots of notes (above, not proper UML2.0). After some debugging and stepping through code late into the afternoon, I realized I totally bypassed the obvious early in the morning.

Volker, if you are reading this, you sir are not only a recognized member of the Lenovo Thinkpad Tablet community but a brilliant coder!

To distinguish whether a MotionEvent is derived from a human thumb or a TPT’s pen, Volker polls MotionEvent.getTouchMajor(). If a fatty finger touches the screen, the diameter of the ellipse will be > 0. If it’s an anorexic digitizer pen, it will be 0.0f. This whole time I was combing the code for a special flag, a Lenovo hardware device code, or some sort of Ice Cream Sandwich backport. When I realized it was just a simple check, I laughed like a mad man for a couple of seconds.

Zero lines coded today but I have a greater respect and understanding of Android’s Canvas API thanks to the Open Source Community.

Share

Hardware accelerated OpenGL for Android 3.0+

In the AndroidManifest.xml, the <application> tag has a ‘hardwareAcclerated’ attribute when set to true will improve only the following:

  • Canvas
  • Paint
  • Xfermode
  • ColorFilter
  • Shader
  • Camera

Not all OpenGL 2D operations are accelerated, just some. This is defaulted to false probably to save unnecessary use of resources.

Source:

http://developer.android.com/guide/topics/manifest/application-element.html#hwaccel

Share

10 Step Checklist To Deploy To Android Marketplace


1) Make nice Launcher Icons
xhdpi – 96px x 96px @ 320 dpi
hpdi – 72px x 72px @ 240 dpi
mdpi – 48px x 48px @ 160dpi
ldpi – 36px x 36px @ 120dpi

  • Safe area of 4px padding to make it look consistent with other icons that have 4px padding too
  • This is what the user will see in their device to launch the app
  • Promote the brand and tell the story of the app
  • Don’t put the app name in the icon because the app name will always be displayed adjacent to the icon
  • Don’t put excessive detail as they need to look good at small sizes where the small details are lost
  • Try not to have cropped icons and use non-square unique shapes when appropriate
  • Don’t make icons look anorexic cause they might be so thin they blend in with the background
  • Try to make use of the alpha channel to apply sheen to images
  • Update Android project to have this icons as a drawable

2) Update AndroidManifest.xml

  • Take the icons from Step 1 and update the Android project’s /res/drawables accordingly
  • Update the Application icon
    • <Application android:icon="@drawable/lowercaseidtoicon"/>
  • VERY IMPORTANT: Be sure you are happy with the package name right now at this moment. It’s a real B!TCH if you want to change it later. Once uploaded, you cannot delete it from the marketplace, you can only un-publish it.
    • <manifest package="com.companyname.myappname"/>

3) Export Signed .apk

  • Use your Production Certificate that’s valid for 25+ years to sign the .apk.
  • Don’t have one? Create one
  • Don’t use the debug key cause then users who have the app install will not be able to receive updates a year from install

4) Prepare Screenshots (min 2, max 8)

  • Android Market will only accept images in the following dimensions:
    • 320 x 480
    • 480 x 800
    • 480 x 854
  • Use DDMS in Eclipse ADT to access the device on-screen to take screenshots

5) Prepare Promo Graphic(180 x 120 @ 72dpi)

  • Used to promote app in Android Market outside of detail page

6) Prepare Feature Graphic (1024 x 500 @ 72dpi)

  • This is not an advertisement, this is a teaser
  • Use vivid colors to stand out because B&W is used in the background of the OS and web
  • Used in the featured section in Android Market
  • Try to keep contents inside 924 x400 because the Market may crop this image
  • Try to use large font size because this may be scaled down to the point small text will not appear readable

7) Prepare Application Icon (512 x 512 @ 72dpi)

  • Used in top left corner of the app’s detail page in the Marketplace

8) Prepare YouTube Demo (0:30-2:00 minutes in length)

  • Highlight what users want to know

9) Prepare Listing Details Text

  • Title (30 max)
  • Description (4000 max),
    • Briefly describe what permissions are being asked
    • Why they are needed?
  • Change Log (500 max)
  • Promo Text (80 max)
  • App Category
  • Customer Support Strategy
    • Website URL?
    • Email address?

10) Upload to Android Marketplace and PUBLISH!

  • Link for developers
  • If all the deployment artifacts are prepared, the visit to the upload side should go smoothly
  • Don’t forget to activate the .apk
  • Once everything has been submitted, check to see if your app is available
    • http://market.android.com/details?id=<package_name>

From my initial experience, I totally took this process for granted. I didn’t allocate as much time as I should have. These elements are extremely important for the marketing and distribution of an application. Thus time and budget needs to be allocated accordingly. I put together this list so it will help to make even more apps in the future.

Don’t forget to build a promo button:

Share

Size and Format of Launcher Icons in Android

ldpi – 36px x 36px @ 120dpi
mdpi – 48px x 48px @ 160dpi
hpdi – 72px x 72px @ 240 dpi
xhdpi – 96px x 96px @ 320 dpi

Source:
http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html

Share

My Android Marketplace Deployment Checklist (Work In Progress)

UPDATE: This checklist is superseded by this

Collected a whole bunch of notes on deployment. Gonna organize this another day…

image
image
image
image
image

Share

StrictMode in Android


Android has a way of catching potentially locking operations, like disk access or internet, on the app’s main thread. StrictMode will throw a NetworkOnMainThreadException error when this happens. As a developer this is incredibly annoying but this is for the greater good to prevent ANR (Application Not Responding) ruining the user experience. To circumvent this, StrictMode can be told to endorse a policy that disables all checks.


StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);

Code at your own risk.

Resources:

1) Android Honeycomb: NetworkOnMainThreadException even when using AsyncTask and no strict mode?

2) developer.android.com – StrictMode Class Overview

Share

Notes: To Shutdown An Activity, Use .finish()

android.app.Activity.finish()

public void finish ()
Since: API Level 1
Call this when your activity is done and should be closed. The ActivityResult is propagated back to whoever launched you via onActivityResult().

Share

Older posts «