• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Uri of image stored in SQLite db

Hi,
I need to attach image to email from application. Images are being shown from my SQLite database.
What would be Uri for that image (e.g. ImageView has that image) so that I can attach it to email/mms.

Thanx.
 
This is actually something you need to code into the app*. A URI is something that is translated by a content provider.

It is a lot to explain in a single post here, but the best place to get started would be to read up on content providers:

Content Providers | Android Developers


* there might be a library out there that will help but I dont know of any off the top of my head. I think it's better to just learn how to do it manually first too.
 
Just to make my understanding clear.

1) Attaching image to email/mms application requires image to be in URI format (Intent.EXTRA_STREAM) as they do not accept image bytes directly.
My images are stored in SQLite db.

2) If above is true then need to implement custom content provider which in turn return image URI on query.

Is above correct ? Verify me.
Thanx for reply.
 
Back
Top Bottom