Trying to display the picture in my app that was just taken with the built in camera app

Ted pottel

I'm trying to make a app that will allow the user to take a photo then display it in the app and save it.

I'm using the following code to take the picture (from Google)

Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(takePictureIntent, 1);

How can I tell when the user presses the back button and return to my app so I can display the image???

Lena Bru

You did startActivityForResult in the same activity

you need to call 
onActivityResult(int requestcode, int resultCode, Intent data){
if(resultCode==RESULT_OK){

if(requestCode==1){

    // get your data from the intent
   }
  }

}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Pictures taken with the camera in my app are upside down

From Dev

How do I display an image that I just took from my camera in my android app?

From Dev

Images not being saved when picture is taken by camera app that isn't the stock camera

From Dev

Trying to display image taken from camera intent

From Dev

Get uri of picture taken by camera

From Dev

Delete picture taken from camera

From Dev

Android new Photos app crashes when trying to edit a picture after using the camera

From Dev

Is it possible to display an image over a photo taken in app

From Dev

Android - take picture - pass uri to camera app

From Dev

Android - take picture - pass uri to camera app

From Dev

Not getting desired result for a camera app that sets the image taken as wallpaper

From Dev

Lock screen just for my app

From Dev

Android adding image to picture taken with camera

From Dev

picture taken with camera doesn't resize in uiimageview

From Dev

Upload a picture taken by the camera to a server with limited size

From Dev

Getting the URL of picture taken by camera with Photos Framework

From Dev

Strange size of picture taken with Android Camera

From Dev

Android: Upload image just taken bij camera

From Dev

Why does the screenshot show just white when I'm trying to take a screenshot of my app programmatically in Swift?

From Dev

Why does the screenshot show just white when I'm trying to take a screenshot of my app programmatically in Swift?

From Dev

trying to create an email feature for my app but just getting this error? error: variable email might not have been initialized

From Dev

My Camera preview on my camera app is not clear (Android)

From Dev

implement set as picture button in my app

From Dev

implement set as picture button in my app

From Dev

Taking a picture in my app and saving it in the gallery

From Dev

Display Camera Roll like in the Twitter App?

From Dev

Android: taking a picture without calling local Camera app

From Dev

Why pictures taken by my app are 0 size in Android?

From Dev

How to make pictures taken by my App backup-able

Related Related

  1. 1

    Pictures taken with the camera in my app are upside down

  2. 2

    How do I display an image that I just took from my camera in my android app?

  3. 3

    Images not being saved when picture is taken by camera app that isn't the stock camera

  4. 4

    Trying to display image taken from camera intent

  5. 5

    Get uri of picture taken by camera

  6. 6

    Delete picture taken from camera

  7. 7

    Android new Photos app crashes when trying to edit a picture after using the camera

  8. 8

    Is it possible to display an image over a photo taken in app

  9. 9

    Android - take picture - pass uri to camera app

  10. 10

    Android - take picture - pass uri to camera app

  11. 11

    Not getting desired result for a camera app that sets the image taken as wallpaper

  12. 12

    Lock screen just for my app

  13. 13

    Android adding image to picture taken with camera

  14. 14

    picture taken with camera doesn't resize in uiimageview

  15. 15

    Upload a picture taken by the camera to a server with limited size

  16. 16

    Getting the URL of picture taken by camera with Photos Framework

  17. 17

    Strange size of picture taken with Android Camera

  18. 18

    Android: Upload image just taken bij camera

  19. 19

    Why does the screenshot show just white when I'm trying to take a screenshot of my app programmatically in Swift?

  20. 20

    Why does the screenshot show just white when I'm trying to take a screenshot of my app programmatically in Swift?

  21. 21

    trying to create an email feature for my app but just getting this error? error: variable email might not have been initialized

  22. 22

    My Camera preview on my camera app is not clear (Android)

  23. 23

    implement set as picture button in my app

  24. 24

    implement set as picture button in my app

  25. 25

    Taking a picture in my app and saving it in the gallery

  26. 26

    Display Camera Roll like in the Twitter App?

  27. 27

    Android: taking a picture without calling local Camera app

  28. 28

    Why pictures taken by my app are 0 size in Android?

  29. 29

    How to make pictures taken by my App backup-able

HotTag

Archive