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:

  1. how know ram size app using?
  2. 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

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -