I read somewhere that broadcast receiver runs in a separate process than the app, and because of this it has an own heap. Now if in the broadcast receiver I start an activity from my app, will this be running in the app’s process or still in the process of the broadcast receiver?
Is the answer of this question also true for native heap (pre-honeycomb API)?.
Wondering because I have to start a memory expensive activity / screen when I receive a push notification, and if I’m in the middle of some other memory expensive activity, in the app, it will probably cause an out of memory error. But if it’s a separate heap (more specifically – native heap, since the memory consumption comes from bitmaps and I’m developing for API pre-honeycomb) I don’t have to worry about it.
Note “read somewhere” refers to: Why so much memory?
Nikolay Chorniy’s post
“There is a tricky workaround which I used to avoid OutOfMemoryError. I registered a receiver so that it ran on different process…”
All components run in the same process by default.
The user may not necessarily appreciate you displaying “a memory expensive activity / screen” in the middle of nowhere.