Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7996265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:40:04+00:00 2026-06-04T14:40:04+00:00

Can we rely on our Android app getting a set amount of memory or

  • 0

Can we rely on our Android app getting a set amount of memory or does it vary between phone models or OS versions?

For example, I have a memory cache, and I’ve set its limit to 5 MB. If on one device, my app will only get 8 MB of memory to play with, and on another, 24 MB, I’d like to tune the cap of the memory cache to take advantage of more or less memory.

Is there any way to figure this out, does the amount even vary?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T14:40:05+00:00Added an answer on June 4, 2026 at 2:40 pm

    Yes, the maximum heap size varies from device to device. You can check the device’s approximate per-application memory class by calling getMemoryClass().

    Returns the approximate per-application memory class of the current device. This gives you an idea of how hard a memory limit you should impose on your application to let the overall system work best. The returned value is in megabytes; the baseline Android memory class is 16 (which happens to be the Java heap limit of those devices); some device with more memory may return 24 or even higher numbers.

    The only built-in way to change heap size of an app is by setting android:largeHeap="true" in the AndroidManifest.xml. This will generally increase heap size from 48 to 128. Keep in mind this approach will only work on 3.x tablets. Otherwise, you’ll need a rooted device, which is obviously not something you would want to rely on as a developer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our app is getting hit pretty hard by a memory leak. I've found that
We're building an application for OS X, and we can't rely on our users
If a Thread creates a daemon Thread, can I rely on the fact that
My company wants to start building mobile versions of our websites so we need
I'm looking to create a mobile version of our website/web app. What's a good
I'm writting an application using Zend_Framework (so the solution can rely on it). How
Should I avoid using Include in queries, or I can rely on the EDM
I can't import ctypes on the production GAE server, which is causing our code
Several methods in our code base use a 'MaybeObject' that can be passed into
Newbish AWS question: Our Rails app currently allows image uploads via Carrierwave to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.