Android Question Problem with allocating lot of memory RAM

Luiz Fernando Orlandini

Active Member
Licensed User
Longtime User
Hi All.

My APP implements an interface that calls a service to monitor latitude and longitude of ther user by GPS.

My service is implemented with a loop, using StartServiceAt, with a period of 5 seconds. For each 5 seconds the APP calls a web service to register the position of the user.

Well, everything works like a charm, except the consume of memory RAM. After some minutes (30 or 40), the application that has started with approximately 13 Mb, could increase until 90/100 Mb.

How can I identify what piece of code is responsible for this higher consume of memory RAM?

Thanks
 

Luiz Fernando Orlandini

Active Member
Licensed User
Longtime User
Yes Erel. I got an out of memory error.

** Service (gpstrack) Start **
** Service (gpstrack) Start **
** Service (notificationpushservice) Start **
** Activity (main) Pause, UserClosed = false **
** Service (answernotification) Create **
** Service (answernotification) Start **
** Activity (main) Resume **
java.lang.OutOfMemoryError
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:640)
at android.graphics.Bitmap.createBitmap(Bitmap.java:620)
at lso.a(Unknown Source)
at lss.a(Unknown Source)
at lss.a(Unknown Source)
at lss.b(Unknown Source)
at lrz.a(Unknown Source)
at lsh.a(Unknown Source)
at lnp.a(Unknown Source)
at lna.a(Unknown Source)
at lna.b(Unknown Source)
at lwt.k(Unknown Source)
at lwt.run(Unknown Source)

Thanks
 
Upvote 0

Luiz Fernando Orlandini

Active Member
Licensed User
Longtime User
Erel, I'm afraid that is not possible to use LoadBitmapSample.

All my layouts are composed by some panels that use a background images.

When I use the APP alternating with all layouts, after about 10 interactions approximately, the out of memory errors occurs.

Any ideia?
 
Upvote 0

Luiz Fernando Orlandini

Active Member
Licensed User
Longtime User
Well.

I have some panels defined in project time in my layouts. This panels use the background image definition.

Some example of image size that I have in my project.

Layout Available.bal
top-background-available - 480x98px - 4,70Kb
background-available - 480x662px - 70Kb
btn-menu - 81x74px - 3kb
btn-menu-pressed - 81x74px - 3kb

Layout NewOrder.bal
background-full - 480x760px - 11Kb
top-background-available - 480x98px - 4,70Kb
btn-back - 81x74px - 3kb
btn-back-pressed - 81x74px - 3kb
btn-accept - 240x102px - 2,96Kb
btn-accept-pressed - 240x102px - 2,96Kb
btn-reject - 240x102px - 2,96Kb
btn-accept-pressed - 240x102px - 2,96Kb
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…