TAKING SMALL PICTURE IMAGE

I am trying to use the camera intent ACTION_IMAGE_CAPTURE to retrieve
a small bitmap image that I can
  set to an imageview background on the current running activity
screen

Objective of code: User will be able to take a picture of an image
                                   which will then be displayed on the
current
                                   activity screen in an "ImageView"
box

Utilizing: ImageView Class, MediaStore Class, an intent to capture
image,
                        Bitmap Factory class to convert file string to
bitmap

Pseudo:          1.  Start Camera on top of current activity calling
intent w/ ACTION_IMAGE CAPTURE
 (not really       2.  Take Picture and place image to file
      but...)        3.  Take file and store to bitmap (I have no clue
what I'm doing there)
                       4.  Set it to the background of the ImageView
to the captured image

ISSUE: Biitmap bm IS NULL AFTER IMAGE IS ASSIGNED
              The picture has been saved to the phone,
                 and that part is correct

I need someone to show me how I can set the background of imageNew
          to the stored image

<code>
        ImageView imageNew = (ImageView) findViewById
(R.id.ProductImageView);
        Intent imageCaptureIntent = new Intent
(MediaStore.ACTION_IMAGE_CAPTURE);

        startActivityForResult(imageCaptureIntent, 1);
        imageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT,
                                                                        
Uri.fromFile(new File("NewImage")));
                startActivityForResult(imageCaptureIntent, 1);



        Bitmap bm = null;
        bm = BitmapFactory.decodeFile("New_Image");

        imageNew.setImageBitmap(bm);
<code>

PS. I hope this code is helpful to others looking to do similar
           tasks with small returned images
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to