Let me tell you what I did, So others who visit this thread can come to know the steps:
1) parse /proc/meminfo command. You can find reference code here:
Get Memory Usage in Android
2) use below code and get current RAM:
MemoryInfo mi = new MemoryInfo();
ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
activityManager.getMemoryInfo(mi);
long availableMegs = mi.availMem / 1048576L;
Note: please note that - we need to calculate total memory only once. so call point 1 only once in your code and then after, you can call code of point 2 repetitively.