Solution for the error "Method called after release()" in Android Camera API

Today when I am working on camera API in android, I got an error telling "ERROR/AndroidRuntime java.lang.RuntimeException: Method called after release()".


The solution for this is, I am trying to access the camera somewhere after I have released it. So in onResume() set the previewCallback to null. In my case this solved my problem. setPreviewCallback(null);

Happy Coding !!!


Popular posts from this blog

Open Gallery and get the selected image in appplication

Dismiss or Cancel dialog by swipe gesture

AlarmManager and Notification in Android