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

  • SEARCH
  • Home
  • 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 8558291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:46:42+00:00 2026-06-11T15:46:42+00:00

I want to make an app, when i press on a certain button i

  • 0

I want to make an app, when i press on a certain button i want to open the cam then capture the image and after i capture it.

I want to open this image in a new activity, putting this image in this new activity in addition to two buttons one to delete it and the other one to save it in a certain directory of the tablet.

i use the code to open the cam:

    Open_CAM.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v)  {

            Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
           startActivityForResult(cameraIntent, CAMERA_REQUEST);  

I don’t know what can i do after that?

Any help please…

  • 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-06-11T15:46:43+00:00Added an answer on June 11, 2026 at 3:46 pm
    Open_CAM.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v)  {
                    Intent photoPickerIntent= new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                    photoPickerIntent.putExtra(MediaStore.EXTRA_OUTPUT, getTempFile());
                    photoPickerIntent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString());
                    photoPickerIntent.putExtra("return-data", true);
                    startActivityForResult(photoPickerIntent,TAKE_PICTURE);}}
    
     private Uri getTempFile() 
     {
          File root = new File(Environment.getExternalStorageDirectory(), "ServiceMySigns");
          if (!root.exists()) 
          {
              root.mkdirs();
          }
         final Calendar c = Calendar.getInstance();
         int y = c.get(Calendar.YEAR);
         int m = c.get(Calendar.MONTH);
         int d = c.get(Calendar.DAY_OF_MONTH);
    
         int h = c.get(Calendar.HOUR_OF_DAY);
         int mi = c.get(Calendar.MINUTE);
    
          //String filename=""+y+"-"+"-"+(m+1)+"-"+d+" "+h+":"+mi;
          String filename=""+System.currentTimeMillis();
          File file = new File(root,filename+".jpeg" );
          muri = Uri.fromFile(file);
          selectedImagePath=muri.getPath();
          Log.v("take picture path",selectedImagePath);
          return muri;
      }
    
      public void onActivityResult(int requestcode,int resultcode ,Intent data)
      {
          switch(requestcode)
          { 
          case TAKE_PICTURE: 
              if(resultcode==RESULT_OK)
              { 
                  BitmapFactory.Options o = new BitmapFactory.Options();
                  o.inSampleSize=8;
                  Bitmap newImage = Bitmap.createScaledBitmap(BitmapFactory.decodeFile(selectedImagePath,o), 
                                                             150, 
                                                             150, 
                                                             false);}}}
    

    After you got bitmap in onActivityResult you can send that bitmap to another activity through intent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want this non-ui app to open from an icon press and then invoke
I am new android app developer i want make app for tablets and phone
im new developer and making my firt iPhone app ,and i want to make
I'm trying to make a random image appear on the press of a button.
I want to make a simple action in which when i press a button
I have a navigation based app. Press a button on main view, then I
I want to make an app that has a view that moves randomly or
I want to make an app that can receive broadcast when other apps on
I want to make an App Engine connected Android app, and I'm beginning with
i want to make an app which can add the file properties of a

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.