Hello,
If you wind up on this page you must be getting a Blackberry Application Resource Monitor (ARM) Shut Down and have no idea why.
ARM, if I am not mistaken was introduced from 7.0 on-wards. This monitors the applications and can be configured. If there is too much activity from your application when it is in the background, or when the screen is locked, it will give you warnings and shut down your application. This way there is no unnecessary background activity and it saves the device resources like the battery.
I was unable to find the cause for such warning in my application. Hunted down every thread I had that was doing work, debugged and was at constant battle to find the cause, but the threads seem fine. That is when I came across the Class BasicFilteredList, this has a method 'setMinimumRefreshInterval'. This basically refreshes the data set according to the given interval. Even when the application was in the background or the screen was locked the refresh still happened. As a work around I detected when the application is going to the background and when the screen is locked and set a larger value to the refresh interval. Then decreased the interval again when I noticed the application in the foreground. Maybe this is your issue as well, putting it on the blog so it might help someone else as well.
Useful links:
http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/collection/util/BasicFilteredList.html#setMinimumRefreshInterval(long)
http://devblog.blackberry.com/2012/05/application-resource-monitor/
If you wind up on this page you must be getting a Blackberry Application Resource Monitor (ARM) Shut Down and have no idea why.
ARM, if I am not mistaken was introduced from 7.0 on-wards. This monitors the applications and can be configured. If there is too much activity from your application when it is in the background, or when the screen is locked, it will give you warnings and shut down your application. This way there is no unnecessary background activity and it saves the device resources like the battery.
I was unable to find the cause for such warning in my application. Hunted down every thread I had that was doing work, debugged and was at constant battle to find the cause, but the threads seem fine. That is when I came across the Class BasicFilteredList, this has a method 'setMinimumRefreshInterval'. This basically refreshes the data set according to the given interval. Even when the application was in the background or the screen was locked the refresh still happened. As a work around I detected when the application is going to the background and when the screen is locked and set a larger value to the refresh interval. Then decreased the interval again when I noticed the application in the foreground. Maybe this is your issue as well, putting it on the blog so it might help someone else as well.
Useful links:
http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/collection/util/BasicFilteredList.html#setMinimumRefreshInterval(long)
http://devblog.blackberry.com/2012/05/application-resource-monitor/
No comments:
Post a Comment