Good day,
I have an app that is set to display only in portrait mode. One of the activities has a button that invokes the camera, takes a picture and uploads it to the server.
When the phone is held in portrait, and the camera is used, the app takes the photo in portrait and returns to the calling activity, and resumes the code to upload the photo. All good.
When the phone is held in landscape, it takes the photo, and as soon as "OK" on the camera preview is pressed, because the phone is held in the landscape mode, the activity create and resume is called, which recreates the activity and fails to resume the code to upload the image. I have tried to set the orientation to portrait as soon as the photo is taken, which still doesn't help. Any suggestion will be greatly appreciated.
set phone orientation
** Activity (image) Pause, UserClosed = false **
** Activity (image) Create, isFirst = false **
Creating Image Activity
** Activity (image) Resume **
Resuming Image Activity
** Activity (image) Pause, UserClosed = false **
I have an app that is set to display only in portrait mode. One of the activities has a button that invokes the camera, takes a picture and uploads it to the server.
When the phone is held in portrait, and the camera is used, the app takes the photo in portrait and returns to the calling activity, and resumes the code to upload the photo. All good.
When the phone is held in landscape, it takes the photo, and as soon as "OK" on the camera preview is pressed, because the phone is held in the landscape mode, the activity create and resume is called, which recreates the activity and fails to resume the code to upload the image. I have tried to set the orientation to portrait as soon as the photo is taken, which still doesn't help. Any suggestion will be greatly appreciated.
set phone orientation
** Activity (image) Pause, UserClosed = false **
** Activity (image) Create, isFirst = false **
Creating Image Activity
** Activity (image) Resume **
Resuming Image Activity
** Activity (image) Pause, UserClosed = false **