You can request PackageManagerfor FEATURE_EMBEDDEDwhich is implemented by all Android Things devices:
public boolean isThingsDevice(Context context) {
final PackageManager pm = context.getPackageManager();
return pm.hasSystemFeature(PackageManager.FEATURE_EMBEDDED);
}
This constant was recently added to the Android O Preview SDK. Until an O-based Android Things preview comes out, you may need to use the literal name of the constant:android.hardware.type.embedded
source
share