开发者

Sending image from drawable to another app/service

开发者 https://www.devze.com 2023-02-20 21:09 出处:网络
I have a central application which is going to receive messages f开发者_JS百科rom various services and construct dynamicaly a notification (up to 3 or 4 informations from the services in the notificat

I have a central application which is going to receive messages f开发者_JS百科rom various services and construct dynamicaly a notification (up to 3 or 4 informations from the services in the notification). Part of the personalized notification will include images sent from the services (image included in the service package in drawable, not on SD or phone memory) and I just wanted to know how to transfer them properly.

I thought of using a Parcelable or some container to put the image in and then transfer it using an intent but I just don't know how to proceed (retrieving the image bytes and parceling them)... The images are "light", about 5Kb.

Any advise ?


If you want to make your images available to other applications on the cell phone, then I would look in to using a Content Provider.

Android Content Providers

0

精彩评论

暂无评论...
验证码 换一张
取 消