Guest User

Untitled

a guest
Jun 25th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. ActivityManager.MemoryInfo memInfo = new ActivityManager.MemoryInfo();
  2. ActivityManager activityManager = (ActivityManager) getActivity().getSystemService(Context.ACTIVITY_SERVICE);
  3. activityManager.getMemoryInfo(memInfo);
  4. String TotalRam = String.valueOf(memInfo.totalMem);
  5. int totaLram = Integer.parseInt(TotalRam);
  6. String freeRam = String.valueOf(memInfo.availMem);
  7. int freRAm = Integer.parseInt(freeRam);
Add Comment
Please, Sign In to add comment