Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5953339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:48:41+00:00 2026-05-22T17:48:41+00:00

in my app i want use the camera for capturing image and send to

  • 0

in my app i want use the camera for capturing image and send to a server.

When the user opens the Camera part of my app, i want to show him the default camera of the device he is using. At present following is the two line code which i am using to capture image

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
 startActivityForResult(intent, TAKE_RECEIPT);

When i run this code in a HTC device, after capturing the image it showed a preview of the image with a done and retake button. When i click done it moves to the previous activity.

when i use the code in a moto device, after capturing the image it showed a preview of the image with a insert, retake and cancel. When i click done it moves to the previous activity.

Like this it will be differing for all devices. So when i click the done or insert or any other button positive button of any devices i want to start the uploading process.

How to proceed this please help me….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:48:42+00:00Added an answer on May 22, 2026 at 5:48 pm

    You can use below code to solve your problem…

    protected void startCameraActivity() 
    
    {
    
        // TODO Auto-generated method stub
            Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE );
            intent.putExtra( MediaStore.EXTRA_OUTPUT, outputFileUri );
    
            startActivityForResult( intent, 0 );
        }
    
        @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) 
        {   
            switch( resultCode )
            {
                case 0:
                    break;
    
                case -1:
                    onPhotoTaken();
                    break;
            }
        }
    
        protected void onPhotoTaken()
        {
    
            ///write code here what you want to done after capture the image using device camera
        }
    
        @Override 
        protected void onRestoreInstanceState( Bundle savedInstanceState)
        {
            if( savedInstanceState.getBoolean( add_project1.PHOTO_TAKEN ) ) 
            {
                onPhotoTaken();
            }
        }
    
        @Override
        protected void onSaveInstanceState( Bundle outState ) 
        {
            outState.putBoolean( add_project1.PHOTO_TAKEN, _taken );
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use modal pop-up windows in our web app in Ruby on
I am writing an iframe based facebook app. Now I want to use the
I want our app to show the online help page (so it's always up
What is the best way to use the iphone camera in your app? I
In my iPhone app, I take a picture with the camera, then I want
My web-app records users via webcam and microphone. I want to use HTML/JS for
I want to use a Button in my android app but I want to
I want to use WPF in an app. I want to write it in
i want to use a chart in my iphone app. i find pretty good
I want to use UILocalNotifications as a background timer for an app. Can this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.