lundi 20 juillet 2015

ActiveAndroid Not saving blob type data(Image) in Sqlite

This is My model class ...i want to insert image file in db using activeandroid .i converted image file into bytes ... but bytes is not stored in Db ... the field type in Table is Blob

import com.activeandroid.Model;
import com.activeandroid.annotation.Column;
import com.activeandroid.annotation.Table;

@Table(name = "contact")

public class Contact extends Model {
    @Column(name = "ID")
    private int ID;
    @Column(name = "NAME")
    private String name;
    @Column(name = "PHOTO")
    private String photo;
    @Column(name = "TITLE")
    private String title;
    @Column(name = "PHONE")
    private String phone;
    @Column(name = "EMAIL")
    private String email;
    @Column(name = "MEMO")
    private String memo;
    @Column(name = "Image")
    private byte[] _image;`

Aucun commentaire:

Enregistrer un commentaire