- Dec 12, 2022
- 357
- 2
I would like my app to detect when a device's resources are getting low, which might mean my app is about to be killed by the OS.
I thought that one of the memory metrics would work, but even the "Available Memory" method stayed the same:
[H3]
Hi, I am trying to load a lot of images - with the inevitable result that the app crashes due to 'out of memory'. try/ catch does not catch the error, the app just crashes. Is there any way to check the memory available so that I can take action to avoid the crash? OS.setLowMemory...
So, is there some other metric that my app could use to detect a downward trend in that metric?
P.S. My app will not be in the play store, so I am not bound by any newer SDK restrictions.
I thought that one of the memory metrics would work, but even the "Available Memory" method stayed the same:
[H3]
برای دیدن لینک ها باید ثبت نام کنید
[/H3]Hi, I am trying to load a lot of images - with the inevitable result that the app crashes due to 'out of memory'. try/ catch does not catch the error, the app just crashes. Is there any way to check the memory available so that I can take action to avoid the crash? OS.setLowMemory...
برای دیدن تصاویر باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید
So, is there some other metric that my app could use to detect a downward trend in that metric?
P.S. My app will not be in the play store, so I am not bound by any newer SDK restrictions.
برای دیدن لینک ها باید ثبت نام کنید