Code example for ActivityManager

Methods: getMemoryClass

0
		report.append("User: " + android.os.Build.USER + "\n");
		report.append("Configuration: " + config + "\n");
		report.append("Screen Layout: size " + (config.screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) + " long "
				+ (config.screenLayout & Configuration.SCREENLAYOUT_LONG_MASK) + "\n");
		report.append("Display Metrics: " + res.getDisplayMetrics() + "\n");
		report.append("Memory Class: " + activityManager.getMemoryClass() + "\n");
	} 
 
	public static void appendApplicationInfo(final Appendable report, final Context context) throws IOException
	{ 
		try 
		{ 
			final PackageManager pm = context.getPackageManager();
			final PackageInfo pi = pm.getPackageInfo(context.getPackageName(), 0);
			report.append("Version: " + pi.versionName + " (" + pi.versionCode + ")\n");
			report.append("Package: " + pi.packageName + "\n");
			report.append("Databases:");
			for (final String db : context.databaseList())
				report.append(" " + db);
			report.append("\n");