Loading ...

Detect memory limits per application in your Android device | CodeAsp.Net

Detect memory limits per application in your Android device

 /5
0 (0votes)

According to http://developer.android.com/training/displaying-bitmaps/index.html

Mobile devices typically have constrained system resources. Android devices can have as little as 16MB of memory available to a single application. However, keep in mind many devices are configured with higher limits.

If you want to detect what is the memory limit per application for your device you need to write the following piece of code:

        ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
        int memoryClass = am.getMemoryClass();

The "memoryClass" variable holds the memory limit in MB. As you can see for my device it is coming out to be 192 MB.

Comments (no comments yet)

Top Articles