I am using below code to get the photo from my contacts.. but this is throwing exception..
android.database.sqlite.SQLiteException: unknown error: INTEGER data in getBlob_native.
please help me if I miss something.
int idx = cursor.getColumnIndex(ContactsContract.Contacts.PHOTO_ID);
byte[] img = cursor.getBlob(idx);
ImageView i = (ImageView)findViewById(R.id.ImageView);
Bitmap b = BitmapFactory.decodeByteArray(img, 0, img.length);