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

Swidget released to the public

A friend of mine was very interested in a pet project I had started a while ago when I got sick of having no compact version of Google’s switch bar available. The Market only has single toggle widgets and Google’s built in widget is quite large. I don’t toggle all those switches often enough for something like that to be useful.

After several stops and starts, I finally settled on something I could not only live with, but it is something that replaces several widgets on my phone, freeing up a lot of room for something more valuable like a memo widget, clock, pic, app shortcut, etc. etc. etc. My idea was to create a 1×1 cell widget that popped up with several toggle switches after pressing it. By doing so, it allowed for several to be grouped up together into one tiny package. The amount of “clicks” increases by one, and that will put off some people, I’m sure, but I don’t care so much for adding a click if it saves me a ton of room on my Home screen(s).

My friend also suggested I make some of the switches auto-enable themselves if the phone got plugged in as well as turning them back off once you go back on battery. I have found that plugging/unplugging the phone is usually the reason I toggle anything in the first place, so that seemed like quite a handy feature to implement.

I found the challenge to create Swidget quite enjoyable and am pleased with the outcome. I decided that there may be others like my friend and I who would like the option of a compact set of switches rather than a large set of individual ones taking up valuable Home screen real estate. Swidget is now available in the Android Market, AndAppStore, and SlideME for only $1.49.

Enjoy and take care!

Get Android phone settings with ADB

A useful debugging tool, especially if you have several emulators in various states like I do, is to list all the phone settings that are stored in Settings.System and Settings.Secure as well as their current values.

$ adb shell
#sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite> select * from system;
sqlite> select * from secure;

Settings that once were in System migrate to Secure as Android versions get released, so it is sometimes handy to know exactly what state the phone is in while you’re debugging on it.

Pick Folder Intent

One of the powerful features about Android vs other mobile operating systems is the ability to create and Intent and ask the system if there are other activities that might be able to respond, even if they are in some other app. Why reinvent the wheel with every app if there is already one much more capable already out there? By apps working together, we can create an ecosystem of apps that inter-operate without requiring explicit code shared between them. Intents are powerful in that they are open ended and can carry a vast array of data and filters between apps. However, since there is no strict definition on how to create intents for all kinds of purposes, one must follow published guidelines from the authors of apps or rely on a site like OpenIntents.org that register Intents so others may use them correctly. Continue reading

FileBrowser Send / Receive Intents

Blackmoon File Browser app has grown from a simple browser to a full fledged file manager and able to launch apps based on the given file name so that you don’t have to launch the app and then open the file. Expanding on this idea, FileBrowser grew arms with which to pass off data to other apps in singles or multiples. FileBrowser then grew ears to listen for other apps that wish to use it’s functionality to pick files or folders. Most of these Intents are discoverable, but any good dev knows that getting information directly from the source trumps whatever else is available. In this article, I will specify what Intents FileBrowser uses and how you can use them in your own app. 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

Android: Postmortem Reports via email

How can I get postmortem exception information from my deployed app without requiring net access?

One of the major breakthroughs I have had with my Android development has been the addition of a postmortem exception reporter into my apps. I started out my development on the emulator only as I did not have an Android phone of my own yet. I ran into the dilemma of having code that worked fine on the emulator, but crashed on some phones out in the field. Comments were pouring into my app with 1 star ratings and “FC on open”. I searched far and wide for a solution to use with postmortem crash analysis, but each one I researched required net access on the phone in order to report back. I was not going to force the requirement onto my fans because I don’t trust apps that should not need net access but do, so why should I force my fans to trust me? Continue reading

Android: Using Blackmoon File Browser’s MIME type provider

The function I use to translate a filename and given extension into it’s MIME type is available as a Provider in BmFB so that you can use my work for your app too.

    Uri theContentProvider = Uri.parse("content://com.blackmoonit.android.mimetypeprovider/getMIMEtype");
    Uri theContentTypeRequest = Uri.withAppendedPath(theContentProvider, aFile.getName());
    Cursor theTypeResult = managedQuery(theContentTypeRequest, null, null, null, null);
    theTypeResult.moveToFirst();
    if (!theTypeResult.isNull(0)) {
        String theMIMEType = theTypeResult.getString(0);
        ...
    }