Start a new topic

Release Camera Android

Release Camera Android


Hello everybody.

I have my android app working good, it only do a simple image recognition. If I would exit from the app and open the native Camera android app, a mensage appear: "Camera not avaiable".

 

Then I called the activity life cycle methods, and I followed the wikitudeSDKSamples to do this, but the camera still not working.

 

Any idea, plis!

The camera is closed and released by the "onDestroy" event. Are you also forwarding that event to the ArchitectView? Are you getting any errors on previous events (onPause, onStop)?

I don´t have any error in the lifecycle methods, my methods are like:

public void onResume() {

super.onResume();

architecView.onResume();

}

 

protected void onPause() {

super.onPause();

architecView.onPause();

}

 

public void onDestroy() {

super.onDestroy();

this.architecView.onDestroy();

}

 

Do I need some extra code in this methods?

Does the camera work if your application is paused?

Can you send us some more information (logs from your application, some source snippets)? Are you sure that the lifecycle methods are called in the right order and they aren't interrupted by some exception? Try to debug your application step-by-step or adding some debug logging, and check if everything is working.

Thanks now is running perfect.
Login or Signup to post a comment