Is there any way to stop the garbage collector for some time?
I guess you are willing to avoid getting lagged by the gc. If this is the case, your question is similar to this one.
Basically you can't stop the gc but you can force a call using System.gc()
.
The best way of not be lagged by the GC is to avoid the need to collect garbage all the time. You could for example reuse objects instead of nulling them and creating new ones. This quite same pattern as androids CursorAdapter is doing when reusing the View's, it just reused a view to represent new data. The drawback of this that you have to do it manually and program in a very precise way. Also you'll get a better memory handling and a performance boost.