Display icon from my SD card

I would like my application to capture an image from an SD SD card for use as a notification icon in the status bar, but android needs a resource identifier to create a notification using the icon. if I download an image from my SD card, it has a resource identifier and how can I get it? or is there any other way to make this work?

+7
android image resources
source share
1 answer

I do not know if it makes sense to use the notification icon from the SD card.

  • Why can this change during your application?
  • If it does not change, put it in the res folder and access it using R.drawable.name
  • If the user mounts the SD card, img will not be available.

I can't think of a way to hack android to put img from sd card. The Notification constructor just gets the id as an icon.

My recommendation:

A notification icon based on the icon of your application after the icon Design guide .

-one
source share

All Articles