Store and retreieve blob from sqllite database for android
问题 I need to know to define blob data type in eclipse. I am developing an app for android and i want to save image and a recording in database. I know have to use blob as the data type. My question is how do i define it in the class and the DBhandler class. Can someone provide me help with codes. 回答1: Blob is used to save byte array in sqlite. To convert a bitmap to byte array use following code: Bitmap image = BitmapFactory.decodeResource(getResources(), R.drawable.thumbnail);