Search Unity

How to save battery

Discussion in 'Android' started by jerome, Jun 27, 2012.

  1. jerome

    jerome

    Joined:
    Oct 13, 2008
    Posts:
    53
    Hi,

    We are developping a mobile guide for a museum and we have to hide the home and back button of a customized Galaxy S2. So we can't use hardware standby because we will not able to resume the device.
    The application is always ON and we are looking some way to reduce CPU usage, we already do some optimisation like decrease scrren brightness and we reduce the framerate to 1 FPS when the device is not used for 20 seconds.
    Any idea on how reduce CPU usage a bit more with Unity for Android ?

    Thanks
    Jérôme
     
  2. SeikoTheWiz

    SeikoTheWiz

    Joined:
    Aug 1, 2011
    Posts:
    69
    Are you processing/loading anything even when the phone runs a 1fps?
    If the application needs to run non-stop maybe it's because you have to always refresh something in the background.
    But maybe that can be easily stopped if the user hasn't done anything for a while and just resumed when he's back to looking at his phone.

    You might want to give us a bit more of information ;)

    Good luck anyway.
    Jean-Julien

    edit: subscribed to this post ;p
     
    Last edited: Jun 28, 2012
  3. jerome

    jerome

    Joined:
    Oct 13, 2008
    Posts:
    53
    Some audio can be play when in standby mode (low brightness), there are no loading, on the screen there is just some GUI (with NGUI). We just wait that the user touch the screen for resume the application. But reducing the framerate to 1 FPS doesnt seem to save battery a lot ...
    Maybe the mainloop of Unity is not affected by the targetFrameRate parameter ?
     
  4. SeikoTheWiz

    SeikoTheWiz

    Joined:
    Aug 1, 2011
    Posts:
    69
    I can say for sure that changing the framerate of my game is clearly having an effect on the battery.

    Maybe there's a better way for your audio playing?
    Uncompressed in the binay and uncompressing while playing might do a big difference on battery.
     
  5. Aadamgibson

    Aadamgibson

    Joined:
    Mar 30, 2012
    Posts:
    24
    I use Android free app “Easy Battery Saver” on my Smartphone.
     
  6. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374