Jon
Jon

Reputation: 278

Slow multitasking for my Android app

I have developed an Android app that uses GPS and sqlite. The app seems to work great, but for some reason when opening the recently used apps while my app is in that list there is a significant delay. This only happens with my app and happens on my device and the emulator. Is there something special I need to do for cleanup of GPS or my database besides closing the database on destroy? Or is there something else that could cause this behavior?

Edit

After looking into memory usage of my app, I found that it is using about 29 MB and says there is about 9 MB free. I used the initiate GC and a nominal amount of memory was freed which leads me to believe that my app simply needs this much memory. Does this amount of memory used and this amount of memory free explain this behavior? It seems like since I am nowhere near the total amount of memory on the device, I shouldn't be running into this issue. Is this correct? If so, what else could cause this behavior?

Another Edit

After further testing, I have noticed that this only seems to happen on API 23 devices.

Upvotes: 0

Views: 109

Answers (1)

user5227626
user5227626

Reputation:

GPS costs a lot of speed, cause it most of the time drains your cell usage, wifi and GPS. This will cause the device to slow down. Other apps do not have this problem because most are not GPS based or have a phone with low memory

Upvotes: 1

Related Questions