svoid installSimpleMemoryWarningSystem() { MemoryWarningSystem.setPercentageUsageThreshold(0.6); new MemoryWarningSystem mws; mws.addListener(new MemoryWarningSystem.Listener() { public void memoryUsageLow(long usedMemory, long maxMemory) { infoBox_noHide("Memory usage low!!!"); double percentageUsed = ((double) usedMemory) / maxMemory; print("percentageUsed = " + percentageUsed); MemoryWarningSystem.setPercentageUsageThreshold(0.8); } }); print("Memory warning system installed, will print here & show info box"); }