Memory Management: Android | Techbirds
I am wirting this very blog to let my developer friends know the limitation of android devices in order to create a Quality apps. It has been noticed in my practice so far that while developing apps we normally forgets issues concerned with memory.
As mobile devices are lack in resources and efficient coding must be done in order to avoid phone hangs, crashes !!.
Here i am postulating some tips that one can use:
1. Restricting you app cache to maximum of 4mb is good practice although if you use the normal code that one can find on internet would clear the cache completely by emptying the cache folder of data/data/com.teri.app/cache. and then deleting it via code but its good practice to write your custom code for deleting the cache upto a specific point like upto 4mb otherwise clean.
2. As caches are used to make your app appear fast . cleaning it upto Omb size will slow down the process. If we take the example of apple products , iphone etc they never let app die as there is no back press. it caches, store all apps in recents and if necessary it clears otherwise it opens up from recents. There memory releasing might not much issues but in android it will bring a nice usage statics.
3. Clearing recents Background process will be an add on if you are making an app that boosts the memory and performance.
4. Many such apps are there, like boost an open source and other apps that does this memory cleaning tasks.
Long story Short:
- Clear caches of app
- Kill Background processes.
- clear memory at specific level, maintaining fixed size.
447 total views, 1 views today
Share this On