For debugging, many System.println() statements are scattered throughout the code base. As it seems, these statements are executed in production as well and may slow down the app or cause Out of Memory errors.
Proposed solution
Add a global boolean variable debug and wrap all println statements:
if (debug) {
System.println("Log message");
}
The debug variable should be loaded on app start with the debug setting. A menu item should be created in the settings menu to enable / disabe debugging. Note that even after enabling the debug setting, the user has to create the log file manually on the device to obtain any logs.
For debugging, many
System.println()
statements are scattered throughout the code base. As it seems, these statements are executed in production as well and may slow down the app or causeOut of Memory
errors.Proposed solution
Add a global boolean variable
debug
and wrap allprintln
statements:The debug variable should be loaded on app start with the debug setting. A menu item should be created in the settings menu to enable / disabe debugging. Note that even after enabling the debug setting, the user has to create the log file manually on the device to obtain any logs.