Saturday, March 6, 2010

Home Screen Icons

I ran into an interesting issue while testing my minigame, Moles. Once I had the core game working, I decided to add an intro screen that would allow you to pick a difficulty. I made a separate Activity for it and changed the settings in the manifest to account for this.

Launching from Eclipse worked fine, but when I launched the game from the Home screen icon I had made for the game, I got this error:

02-18 01:51:43.750: ERROR/Launcher(106): Launcher does not have the permission to launch Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=cs134.adventure.minigames.moles/.MolesActivity }. Make sure to create a MAIN intent-filter for the corresponding activity or use the exported attribute for this activity.

After much fussing, I discovered that the Home screen icon didn't work, while the one on the programs menu did.

It seems that the Home screen icons are not deleted or updated when an application is uninstalled or reinstalled. Moreover, rather than referencing the manifest, the icon seems to cache the main Activity and ask Android to launch that directly.

No comments:

Post a Comment