title: Android How do you get total memory RAM in the device?
body: <p>I can get total available memory by:</p>
  
  <pre><code>ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
  MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
  activityManager.getMemoryInfo(memoryInfo);
  memoryInfo.availMem;
  </code></pre>
  
  <p>However, how do you get Total memory (RAM) of the device?</p>
  
  <p>I did read:
  <a href="https://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android">How do I discover memory usage of my application in Android?</a></p>
  
  <p>It doesn't seem like adding pidMemoryInfo.getTotalPss() gives me the total memory either.</p>