Android Photo capture with Native Camera and Store it

All your problems with Audio, Video and Images.

Android Photo capture with Native Camera and Store it

Postby pareshmayani » Mon Aug 16, 2010 6:36 am

Hello all,
Being new in Anddev.org , hope everybody response me and help me to find out the possible solution to my problem.

I am troubling with the "Android Camera Image Capturing"..i have searched a lot but failed to find out the exact article and site which provide information regarding image capturing with Android Native Camera..

What i want to do is: Want to Capture Photos using Android Native Camera and store it..

so pls suggest me sites, examples, websites, if any

Pls help me..
Thanks
pareshmayani
Freshman
Freshman
 
Posts: 3
Joined: Wed Aug 11, 2010 10:25 am

Top

Re: Android Photo capture with Native Camera and Store it

Postby donEduard » Wed Aug 18, 2010 12:33 pm

hi pareshmayani

something like this:
http://www.brighthub.com/mobile/google-android/articles/43414.aspx
?

Regards, Edi
donEduard
Junior Developer
Junior Developer
 
Posts: 14
Joined: Tue Aug 10, 2010 8:34 am
Location: Switzerland

Re: Android Photo capture with Native Camera and Store it

Postby sumit_android » Wed Aug 18, 2010 1:28 pm

hi pareshmayani,
visit on this site also...its very helpful for me..

http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo
sumit_android
Junior Developer
Junior Developer
 
Posts: 19
Joined: Fri Feb 19, 2010 6:59 am
Location: India

Re: Android Photo capture with Native Camera and Store it

Postby f3992an » Fri Aug 20, 2010 2:09 am

f3992an
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Aug 20, 2010 1:58 am

Re: Android Photo capture with Native Camera and Store it

Postby blundell » Fri Aug 20, 2010 9:33 am

I've just done this myself:
Code: Select all
private void takePhoto() {
                Log.i(MainActivity.TAG, "Take Photo");
                Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                intent.putExtra(MediaStore.EXTRA_OUTPUT, MediaStore.Images.Media.INTERNAL_CONTENT_URI.toString());
                startActivityForResult(intent, CAMERA_ACTIVITY);
        }

Code: Select all
@Override
        protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
                super.onActivityResult(requestCode, resultCode, intent);
                Log.d(MainActivity.TAG, "onActivityResult() Result Code: " + resultCode);
                if (resultCode == RESULT_CANCELED) {
                        // TODO
                        return;
                }
                switch (requestCode) {
                        case CAMERA_ACTIVITY:
                                Log.d(MainActivity.TAG, "Got a camera result");
                                // Get the camera data
                                Bitmap bmCamera = (Bitmap) intent.getExtras().get("data");
                                String backgrounUrl = MediaStore.Images.Media.insertImage(getContentResolver(), bmCamera, "savedCameraImage", null);                               
                                break;
                }
        }
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 7 guests