android - How to know how much ram size my app needs? -
i new android , app resulted in outofmemoryexception
. therefore have check how ram app using , try reduce it.
two questions:
- how know ram size app using?
- normally, safe threshold app's ram size not cause
outofmemoryexception
?
thanks lot help!
check out android studio's in-built memory monitor. find under android monitor > monitors
and second part of problem can use activtymanager
class' getmemoryclass ()
method. android doc..
return approximate per-application memory class of current device. gives idea of how hard memory limit should impose on application let overall system work best. returned value in megabytes; baseline android memory class 16 (which happens java heap limit of devices); device more memory may return 24 or higher numbers.
Comments
Post a Comment