Android Camera Photo Issue. Help needed

Sam.27Sam.27 NZMember ✭✭

Hi ,

My android application has a function to take a photo and display it in the listview. I am using tab control to record few values before I take and save a photo all these runs in a single activity.

So my issues is,
When I call the camera, The activity finishes, and closes everything including all the active threads and opens a media (Camera) in a different thread. and after i take a pic and when I save it, it Restarts(Calls the Oncreate). Is there any way I can open a camera in same thread and not to close the activity?

From Logfile:
11-16 15:11:43.899 D/PhoneWindow(10458): FMB isFloatingMenuEnabled mFloatingMenuBtn : null
11-16 15:11:43.899 D/PhoneWindow(10458): FMB isFloatingMenuEnabled return false
Thread finished: #9

11-17 08:28:41.607 D/Mono (24534): DllImport searching in: '__Internal' ('(null)').
11-17 08:28:41.607 D/Mono (24534): Searching for 'java_interop_jnienv_is_assignable_from'.
11-17 08:28:41.607 D/Mono (24534): Probing 'java_interop_jnienv_is_assignable_from'.
11-17 08:28:41.607 D/Mono (24534): Found as 'java_interop_jnienv_is_assignable_from'.
11-17 08:28:41.617 D/Mono (24534): DllImport searching in: '__Internal' ('(null)').
11-17 08:28:41.617 D/Mono (24534): Searching for 'java_interop_jnienv_get_byte_array_region'.
11-17 08:28:41.617 D/Mono (24534): Probing 'java_interop_jnienv_get_byte_array_region'.
11-17 08:28:41.617 D/Mono (24534): Found as 'java_interop_jnienv_get_byte_array_region'.
11-17 08:28:41.627 D/Mono (24534): DllImport searching in: '__Internal' ('(null)').
11-17 08:28:41.627 D/Mono (24534): Searching for 'java_interop_jnienv_set_byte_array_region'.
11-17 08:28:41.627 D/Mono (24534): Probing 'java_interop_jnienv_set_byte_array_region'.
11-17 08:28:41.627 D/Mono (24534): Found as 'java_interop_jnienv_set_byte_array_region'.
11-17 08:28:41.687 D/Mono (24534): DllImport searching in: '__Internal' ('(null)').
11-17 08:28:41.687 D/Mono (24534): Searching for 'java_interop_jnienv_call_nonvirtual_int_method_a'.
11-17 08:28:41.687 D/Mono (24534): Probing 'java_interop_jnienv_call_nonvirtual_int_method_a'.
11-17 08:28:41.687 D/Mono (24534): Found as 'java_interop_jnienv_call_nonvirtual_int_method_a'.
11-17 08:28:41.757 D/Mono (24534): DllImport searching in: '__Internal' ('(null)').
11-17 08:28:41.757 D/Mono (24534): Searching for 'java_interop_jnienv_call_float_method_a'.
11-17 08:28:41.757 D/Mono (24534): Probing 'java_interop_jnienv_call_float_method_a'.
11-17 08:28:41.757 D/Mono (24534): Found as 'java_interop_jnienv_call_float_method_a'.

**But When I keep a breakpoint in my OnStop and keep the thread alive and take a photo and save it and run through the breakpoint, I can able to save it and use it in my Activity. In this case I am keeping the thread alive. In debug mode it is ok, but I do not know how to fix it. Can Some one could help me? **

PS. It is not just samsung device, its the same for HTC. My app support min android version : 4.1 (Jelly Bean)

Thanks in advance.

Best Answer

  • Sam.27Sam.27 NZMember ✭✭
    Accepted Answer

    I have got this issue fixed, but the only way is I need to get rid of tabbed control and use in a fresh layout.

Answers

  • Sam.27Sam.27 NZMember ✭✭
    Accepted Answer

    I have got this issue fixed, but the only way is I need to get rid of tabbed control and use in a fresh layout.

Sign In or Register to comment.