Category: Android, Blog, Development

Using Processes to Avoid OutOfMemoryErrors

Using Processes to Avoid OutOfMemoryErrors

Do you want to increase available memory (heap) size? Check out this simple trick and avoid utOfMemoryErrors!

One of the ways to increase available memory (heap) size is to divide application to separate processes. Each <activity>, <service>, <receiver> and <provider> can specify a process in which it should run. To do this just set

attribute in particular tag in AndroidManifest.xml. Where com.example.appname is desired process name. You can assign multiple components to one process.

More info can be found in official Android API Guide

Do not use static variables to pass data between components declared to run in different processes. Process can be killed and started by system without your control. When process is started “fresh” class of component is loaded.

Start working on you app right away!

Receive your first working demo within 7 days from the project kick-off

Not ready for an estimate? Write to us and book Product Design Workshop to clarify your vision and prepare the crucial documentation.