mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-28 14:30:03 +00:00
Scone
This commit is contained in:
parent
24380b7e69
commit
c251c4880b
40 changed files with 1270 additions and 1185 deletions
13
app/src/main/java/com/vectras/vm/utils/DeviceUtils.java
Normal file
13
app/src/main/java/com/vectras/vm/utils/DeviceUtils.java
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package com.vectras.vm.utils;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
|
||||
public class DeviceUtils {
|
||||
public static double totalMemoryCapacity(Context context) {
|
||||
ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
|
||||
ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
activityManager.getMemoryInfo(memoryInfo);
|
||||
return memoryInfo.totalMem;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue