I'm having a slight problem when creating shortcuts on the Android desktop.
Firstly, I have a 72x72 icon, I load it from an SD card into a Bitmap object.
With this raster object, I set it as an icon resource.
The problem I am facing is when I install it, the image on the shortcut is displayed in the center and turned off. From the screen metrics, I get a size of 72x72, not sure what the deal is.
the code:
Bitmap theBitmap = BitmapFactory.decodeFile("/sdcard/icon.png");
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, theBitmap)
I tried to resize it and make it work using canvas, a picture, and another bitmap, however when I restart the phone it returns to a small size.
Using the same icon as a resource with the ability to draw makes it ideal, but not dynamic:
Parcelable iconResource = Intent.ShortcutIconResource.fromContext(this, R.drawable.icon);
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconResource);
Samsung Epic 4g w/2.1