Optimize battery android app consumption

1

I have developed a app in android , but some users have told me that from time to time your mobile phone sends you a notification that my app is consuming a lot of battery.

How can I optimize battery consumption or monitor it to see where it consumes more?

I have activated the push notifications with firebase and also the crashlitycs reporting, I do not know if that will affect

    
asked by Alberto Mier 27.11.2017 в 10:57
source

1 answer

0

It can be for many reasons, you could verify the following:

  • If you are using Firebase Realtime Database verify that you are removing the listener when your application is not active.
  • That your application is not performing tasks in the background that involve data consumption.
  • Avoid creation of unnecessary objects.
  • Check the listeners / subscriptions you have inside your app and not forget to do the unregister / unsubscribe when you do not need it.
  • Avoid storing many objects in memory using Static.

Android Studio provides tools so you can monitor the memory consumption of your application, for more information I leave this link:

link

    
answered by 27.11.2017 в 13:44