Android Market vs. Drawable XML

Android drawable resources include the ability to provide and XML resource that specifies a different name for it’s bitmap resource.  It is an especially handy mechanism for library code to refer to a specific drawable resource that your app provides under a different name.

For example a drawable xml named “app_icon.xml” could contain:

<!--?xml version="1.0" encoding="utf-8"?-->
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/ic_MyAppName"
/>

If you used this kind of resource as your application’s icon resource inside your AndroidManifest.xml file, though, you have a problem. While technically, the app will function normally, the Android Market tries to check to make sure your app’s icon meets some guideline criteria and cannot handle an XML drawable. Android Market will refuse to upload your app and tell you “The icon for your application is not valid. Please use a 48×48 PNG.”

If you use XML drawables, please keep this limitation in mind and do not reference them inside your AndroidManifest.xml.

Android Market does not allow use of Android icons

If you tried to publish your app to the Android Market and received an error similar to the following one, you may be running up against a block put in place by Google:

The file is invalid: W/ResourceType(15353): No known package when getting value for resource number 0x01080049 ERROR getting ‘android:icon’ attribute: attribute is not a string value

I recently ran into this error trying to publish one of my apps because the icon I chose for my app’s Preferences screen activity was a built in android resource “@android:drawable/ic_menu_preferences”. Continue reading

Android: Always create a Launcher activity!

ALWAYS CREATE A LAUNCHER ACTIVITY!

I cannot stress that enough. When I created AttachSave, I designed it with the intention that it would be a small, hidden app that did not clutter up the launcher tray with useless apps that couldn’t be run traditionally anyway. Despite warnings from others posted elsewhere, I thought making the description quite clear on how to use the app would be sufficient to teach people on how to use the app. Continue reading