During the development of the Android address book application, I need to put the picture in the db, but I don't know how to.

Asked 2 years ago, Updated 2 years ago, 45 views

During the development of the Android address book application, I need to put the picture in the db, but I don't know how to. When I surfed, I heard that I need to extract the image separately as a byte type and put it in the db. I want to know how to extract it byte type and how to put it in db I'd like to know other ways.

android sqlite

2022-09-22 21:52

1 Answers

When you save pictures in the public address book database on Android, you must store binary data in the BLOB column type. However, if you're only going to use pictures in the app you're creating, you can save the image as a file and then save the file path to the database. Of course, you can use the first method.

I attached a course related to YouTube.

[Saving images as binary data]

[Save Image as File]


2022-09-22 21:52

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.