How long do Android log entries stay in memory

I am developing a location monitoring app for android. One of my requirements is that it can work for 7 continuous hours. To test this requirement, I'm going to use the Android logging system to log the percentage of battery life every 5 minutes (or maybe more). I can do this for an hour and then do some math and work out if the application can run for 7 hours.

I read that the log entries are stored in a buffer. How often is this buffer flushed? Is there a better way to test my application?

I'm still doing some research on different approaches, but unfortunately most of the testing guides assume your device is connected to a PC.

Source: http://developer.android.com/tools/help/logcat.html

+3


source to share


1 answer


Basically, it depends on how much registration you do (and other apps and system). Logcat uses a fixed size buffer, not one with a maximum age.



You can do adb logcat -g

to see the size of the buffer on your device as it changes.

+4


source







All Articles