Static
Readonly
appearanceReturns the device's appearance.
5.0.7
Static
OSDetermines which operating system is currently running.
import System from '@smartface/native/device/system';
if(System.OS === System.OSType.Android) {
console.log("It is Android");
}
Static
OSTypeDetermines which operating system is currently running.
import System from '@smartface/native/device/system';
if(System.OS === System.OSType.Android) {
console.log("It is Android");
}
Static
Readonly
languageReturns the device's current language set.
0.1
Static
Readonly
regionReturns the device's current region.
2.0.7
Static
Readonly
batteryReturns the battery level of the device in percentage.
0.1
Static
Readonly
isIndicates whether the device is charged or not.
0.1
Static
Readonly
OSVersionReturns the operating system version of the device.
0.1
Static
Readonly
biometricReturns the set of available biometric authentication supported by the device.
4.3.1
Static
androidStatic
iosStatic
Readonly
fingerReturn value shows that if the device supports feature or not. Also it would be show that fingerprint (for Android) or TouchID (for iOS) is defined or not defined on the phone, You need to add Application.android.Permissions#USE_FINGERPRINT permission on AndroidManifest under config/Android when you publish project.
1.1.13
since 4.3.1 Use Device.System#biometricsAvailable
Static
Readonly
biometricsReturns true if the device supports the biometric feature and at least one the biometric is enrolled by user.
4.3.1
Static
Readonly
clipboardclipboard can be used to set a text to the device's clipboard or get a text from it.
0.1
since 5.0.4 Use Device.System#setClipboard and Device.System#getClipboard
Static
Readonly
isDetermine if the current running platform is Smartface Emulator or published application
4.4.0
Static
Readonly
BiometryDevice.System.BiometryType
4.3.1
The set of available biometric authentication types.
Static
validateChecks if the provided finger print matches with the system's finger print. Will be false if TouchID not enabled for iOS and user not enrolled at least one fingerprint for Android or hardware not supported by both of iOS and Android. Requires Application.android.Permissions#USE_FINGERPRINT permission on AndroidManifest. iOS only propery is deprecated.
System.validateFingerPrint({
android: {
title: "Title"
},
message : "Message",
onSuccess : function(){
console.log("Success");
},
onError : function(){
console.log("Error");
}
});
validateFingerPrint
1.1.13
since 4.3.1 Use Device.System#validateBiometric
Static
validateShows the biometric prompt to the user. It will trigger onError callback if the biometric not enabled for iOS and user not enrolled at least one for Android or hardware not supported by both of iOS and Android.
System.validateBiometric({
android: {
title: "Title",
cancelButtonText: "Cancel",
subTitle: "SubTitle",
confirmationRequired: true
},
message : "Message",
onSuccess : function(){
console.log("Success");
},
onError : function(cancelled, error){
console.log("Error");
}
});
validateBiometric
4.3.1
Optional
cancelOptional
subOptional
confirmationOptional
cancelled: booleanOptional
error: stringStatic
vibrateStatic
isStatic
setSet ClipboardData to the device clipboard.
If clipboard contains any sensitive content; such as passwords or credit card information; you must set Device.System#ClipboardData.android.isSensitive to true for Android.
setClipboard
5.0.4
Static
getGet ClipboardData from the device clipboard.
getClipboard
5.0.4
Generated using TypeDoc
Since
0.1
System provides operating system specific information of the device.
Example