All
I want to disable the camera option in device. I start services to get the camera option and then i will lock using lock() method. How can i get camera object to access it?
thanks
Kumar
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do it from a device administrator, but the user has to explicitly enable it and it is only available on ICS. Here’s the reference: http://developer.android.com/guide/topics/admin/device-admin.html
Disable camera – Specifies that the camera should be disabled. Note that this doesn’t have to be a permanent disabling. The camera can be enabled/disabled dynamically based on context, time, and so on. Introduced in Android 4.0.
read this :- http://developer.android.com/reference/android/hardware/Camera.html
for getting camera object If you have opened it within your own application, you must hold onto that Camera object (e.g., in your activity). You cannot get it back.
I suppose if u acquired a lock on camera, you need to release it, use unLock().
Normally, the camera is locked to the process with an active Camera object until release() is called. To allow rapid handoff between processes, you can call this method to release the camera temporarily for another process to use; once the other process is done you can call reconnect() to reclaim the camera.