Battery conservation with camera preview in Google Glass

256 Views Asked by At

I am developing a Google Glass app and one of the major problems I seem to be having is that the device will overheat after the camera preview is displayed for a period longer than about 5 minutes.

My question is: Are there settings that can be adjusted such that the camera preview display uses less power from the battery? This is in hopes that using less power will keep the device from overheating as well. (When tested, the app can run ~50 minutes before draining the battery from 100% to 0%)

1

There are 1 best solutions below

0
Califlower On

Google Glass sucks, period. However, I have managed to extend preview + live video feed to 20 min by reducing brightness.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_camera);
    WindowManager.LayoutParams lp = getWindow().getAttributes();
    lp.screenBrightness = 0f;
    getWindow().setAttributes(lp);
   //rest of your stuff
 }

You can read more about parameters here. Additionally, I turn of rest of the services like Bluetooth and location.

More over I'm implementing temperature detection and closing video stream to allow graceful fallback in the application. You can follow the question, I have working code but will take couple of days to clean up and make a nice example.