We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@rpc(description = "Get Memory Statistics By Type") public float getMemoryStat(@RpcParameter(name = "type") String type) throws InterruptedException { ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo(); ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE); activityManager.getMemoryInfo(mi);
long availableMegs = mi.availMem / 1048576L; // returns percentages long percentAvail = mi.availMem / mi.totalMem; // returns percentages if (type == "avail") { return mi.availMem; } else { return mi.totalMem; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@rpc(description = "Get Memory Statistics By Type")
public float getMemoryStat(@RpcParameter(name = "type") String type) throws InterruptedException {
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
activityManager.getMemoryInfo(mi);
The text was updated successfully, but these errors were encountered: