Dear All,
I found the following substitute for what I needed
from javax.management. There is:
void onLowMemory()
This is called when the overall system is running
low on memory, and would like actively running process
to try to tighten their belt.
http://developer.android.com/reference/android/app/Application.html
And:
public long threshold
The threshold of availMem at which we consider memory to
be low and start killing background services and other
non-extraneous processes.
http://developer.android.com/reference/android/app/ActivityManager.MemoryInfo.html
There seem also to be more APIs since Level 14, for example
onTrimMemory in Application, but I will try level 10 for the
moment.
I also found SystemClock useful, but I am still missing
an API that would give me some statistics about how much
time spent in GC.
Best Regards
Jan Burse schrieb:
Mark Murphy schrieb:
You are missing the point. If I am understanding the documentation for
MemoryPoolMXBean, there cannot be "some other lib". I believe that you
will be needing to remove the ties to javax.management, not replace
them.
Since I only need the memory threshold functionality
I could easily implement the functionality in Android
by myself by polling Runtime.freeMemory() in a thread.
The later is available in Android.
But it would be more handy if there is some existing
lib or even an API in Android that I did not yet see.
Bye
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en