List of utility methods to do Device Information Get
String | getDeviceType(Context ctx) get Device Type if (isTablet(ctx)) return "Tablet"; else return "Phone"; |
String | getDeviceModel() get Device Model return Build.MODEL;
|
int | getDeviceCpuCores() Gets the number of cores available in this device, across all processors. class CpuFilter implements FileFilter { @Override public boolean accept(File pathname) { if (Pattern.matches("cpu[0-9]", pathname.getName())) { return true; return false; try { File dir = new File("/sys/devices/system/cpu/"); File[] files = dir.listFiles(new CpuFilter()); return files.length; } catch (Exception e) { return Runtime.getRuntime().availableProcessors(); |
String | getDeviceUniqueIdentificator( @Nonnull Context context, @Nonnull String appId) Generates an unique, stable UID that identifies the device where the user is currently logged. String telephonyId = null; String androidId = null; if (hasTelephony(context)) { final TelephonyManager telephony = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); telephonyId = telephony.getDeviceId(); if (telephonyId == null) { ... |
boolean | deviceBeRoot() device Be Root if (isSilent) { return isRootSystem(); int i = execRootCmdSilent("echo test"); if (i != -1) { return true; return false; ... |
int | getDeviceCpuCores() Gets the number of cores available in this device, across all processors. class CpuFilter implements FileFilter { @Override public boolean accept(File pathname) { return Pattern.matches("cpu[0-9]", pathname.getName()); try { File dir = new File("/sys/devices/system/cpu/"); ... |
String | get_device_id(Context ctx) gedevicid final TelephonyManager tm = (TelephonyManager) ctx .getSystemService(Context.TELEPHONY_SERVICE); String tmDevice; String tmSerial = null; String androidId = null; tmDevice = "krakenmessages"; try { tmDevice = "" + tm.getDeviceId(); ... |