List of usage examples for android.content.pm PackageManager hasSystemFeature
public abstract boolean hasSystemFeature(String name);
From source file:org.protocoderrunner.apprunner.api.PDevice.java
@ProtoMethod(description = "Check if the device has camera", example = "") public boolean hasCamera() { PackageManager pm = getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA); }
From source file:org.protocoderrunner.apprunner.api.PDevice.java
@ProtoMethod(description = "Check if the device has front", example = "") public boolean hasFrontCamera() { PackageManager pm = getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT); }
From source file:org.protocoderrunner.apprunner.api.PDevice.java
@ProtoMethod(description = "Check if the device has camera flash", example = "") public boolean hasCameraFlash() { PackageManager pm = getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH); }
From source file:org.protocoderrunner.apprunner.api.PDevice.java
@ProtoMethod(description = "Check if the device has bluetooth", example = "") public boolean hasBluetooth() { PackageManager pm = getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH); }
From source file:org.protocoderrunner.apprunner.api.PDevice.java
@ProtoMethod(description = "Check if the device has Bluetooth Low Energy", example = "") public boolean isBluetoothLEAvailable() { PackageManager pm = getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE); }
From source file:org.protocoderrunner.apprunner.api.PDevice.java
@ProtoMethod(description = "Check if the device has microphone", example = "") public boolean hasMic() { PackageManager pm = getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_MICROPHONE); }
From source file:org.protocoderrunner.apprunner.api.PDevice.java
@ProtoMethod(description = "Check if the device has wifi", example = "") public boolean hasWifi() { PackageManager pm = getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_WIFI); }
From source file:org.protocoderrunner.apprunner.api.PDevice.java
@ProtoMethod(description = "Check if the device has mobile communication", example = "") public boolean hasMobileCommunication() { PackageManager pm = getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY); }
From source file:org.protocoderrunner.apprunner.api.PDevice.java
@ProtoMethod(description = "Check if the device has accelerometer", example = "") public boolean hasAccelerometer() { PackageManager pm = getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_SENSOR_ACCELEROMETER); }
From source file:org.protocoderrunner.apprunner.api.PDevice.java
@ProtoMethod(description = "Check if the device has compass", example = "") public boolean isCompassAvailable() { PackageManager pm = getContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_SENSOR_COMPASS); }