I followed the Android developers example of get an image form the camera intent and place it on your view. The problem starts when I try to save that image uri on my SqliteDatabase
( just the link to that image not the full image so I save space) and then I try to restore it on my customadapter.
Link to google dev - > http://developer.android.com/training/camera/index.html
I tried this without success
created a global string logo, and inside handleSmallCameraPhoto
put this
private void handleSmallCameraPhoto(Intent intent) {
Bundle extras = intent.getExtras();
mImageBitmap = (Bitmap) extras.get("data");
ImagenViaje.setImageBitmap(mImageBitmap);
ImagenViaje.setVisibility(View.VISIBLE);
--> logo = extras.get("data").toString();
Then I stored logo on SQLite, and tried to restore it on my adapter this way
String imagePath = c.getString(c.getColumnIndexOrThrow(MySQLiteHelper.COLUMN_LOGO_PATH));
Then
ImageView item_image = (ImageView) v.findViewById(R.id.logo);
item_image.setVisibility(ImageView.INVISIBLE);
Bitmap bitmap = BitmapFactory.decodeFile(imagePath);
item_image.setImageBitmap(bitmap);
item_image.setVisibility(ImageView.VISIBLE);