Android Question How to Load picture from device storage

4rdn1_s

Member
Hi Everyone,

can someone help me,

I want to load a picture file (jpeg, png / bmp) from device internal storage or memory card (I can pick the location) and put it in a variable so i can insert it to table in mysql database, has anyone care to give me direction what should I use.

thank you
 

teddybear

Well-Known Member
Licensed User
I guess you want to load a picture into ImageView, then you can do ImageView.setBackgroundImage(LoadBitmap(FIleDir, yourpic))
 
Upvote 0

4rdn1_s

Member
Yes the idea is to put the pict to imageview, than save the blob to database, but i need to select the picture manualy from device storage. My problem is how to show the dialog box for the storage.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
You can use ContentChooser to show dialog box, then get a picture to store the bitmap to blob.
This is the example
 
Upvote 0
Top