Readonly
byteThe received bytes from the application.
0.1
Readonly
byteThe sent bytes from the application
0.1
Gets/sets sliderDrawer of the Application.
null
3.2.0
This property allows you to prevent the screen from going to sleep while your app is active.
false
4.3.1
Exists the application.
exit
0.1
Restarts the application.
restart
0.1
Set root controller of the application.
setRootController
3.2.0
Readonly
callReadonly
Launches another application and passes data. For Android, you can open application chooser with isShowChooser parameter and set chooser dialog title with chooserTitle. If an app can open a given URL resource onSuccess callback will be triggered otherwise onFailure will be triggered.
// Calling application's Google Play Store page. Will work only for iOS
Application.call({
uriScheme: "market://details",
data: {
'id': Application.android.packageName
}
});
// Open caller app with phone number.
Application.call({ uriScheme: "tel:+901234567890", data: {} });
// Call another application with its own url schema.
Application.call({
uriScheme: "mySchema://",
data: {
key: encodeURIComponent("Smartace Encoded Data")
},
onSuccess: function() {
alert("Application call completed")
},
onFailure: function() {
alert("Application call failed")
}
});
// Call another application with package name and activity name. Works only for Android.
Application.call({ uriScheme: "io.smartface.SmartfaceDev|io.smartface.SmartfaceDev.A", data: {} });
// Call Smartface Emulator with url schema.
Application.call({ uriScheme: "smartface-emulator://", data : {} });
// Open Youtube with Chooser for Android
Application.call({
uriScheme: "https://www.youtube.com/watch?v=VMLU9mfzHYI",
data: {},
onSuccess: function() {
alert("Application call completed")
},
onFailure: function() {
alert("Application call failed")
},
isShowChooser: true,
chooserTitle: "Select an Application"
});
call
Use Linking.openURL instead
0.1
Checks URL's scheme can be handled or not by some app that installed on the device.
To pass this method, URL schemes must be declared into "Info.plist" file for iOS and AndroidManifest.xml file for Android.
for Google Maps
// (Info.plist entry)
<key>LSApplicationQueriesSchemes</key>
<array>
<string>comgooglemaps</string>
</array>
// After entry add on, urlScheme can be check;
import Application from '@smartface/native/application';
const isAppAvaible = Application.canOpenUrl("comgooglemaps://");
// (AndroidManifest.xml entry)
<manifest ...>
...
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="geo"/>
</intent>
</queries>
</manifest>
import Application from '@smartface/native/application';
const isAppAvaible = Application.canOpenUrl("geo://");
canOpenUrl
Use Linking.canOpenURL instead
4.3.6
Readonly
statusGets status bar object. This property is readonly, you can not set status bar but you can change properties of status bar of application.
3.2.0
Static variable that determines direction of the layouts. It can be LTR or RTL
Static Variable to change keyboard type for input fields.
This lets you determine the navigation bar of the phone(the bar which usually has native back button and app switch) Works for Android 8.0 and above. Some phones might not have this.
Determines whether the navigation bar should be light theme or dark theme based.
Application.Android.Permissions
1.1.16
Permission enum for Application. Permission managements should be developed OS specific in the applications. Application.android.Permissions deprecated since 1.1.16. Use Application.Android.Permissions instead.
This function hides keyboard.
hideKeyboard
3.0.1
Readonly
currentThe specified release channel within project.json.
0.1
Readonly
smartfaceThe application name within project.json
0.1
Readonly
appThe application name within project.json
4.0.7
Readonly
versionThe application version within project.json
0.1
Readonly
isIndicates whether the voiceover is enabled. Voiceover is also called a screen reader on Android.
4.3.6
Indicates whether the appearance of the native components such as alert, DatePicker, TimePicker, etc. Android handle the components internally Alert, Picker, SelectablePicker, TimePicker, DatePicker. But for iOS apart from Keyboard and Alert components, must be handled by assigning the proper colors on the component properties.
5.0.7
Protected
_nativeTriggered when unhandelled error occurs.
1.2 onUnhandledError
1.2
import Application from '@smartface/native/application';
Application.on(Application.Events.UnhandledError, (error) => {
console.info('onUnhandledError', error);
});
Triggered after a push (remote) notification recieved. This event will be fired only if application is active and running.
onReceivedNotification
0.1
import Application from '@smartface/native/application';
Application.on(Application.Events.ReceivedNotification, (params) => {
console.info('onReceivedNotification', params);
});
Triggered when application is called by another application. For Android, onApplicationCallReceived will be triggered when the application started from System Launcher. For this reason, if data does not contain key that you can handle, you should ignore this call.
onApplicationCallReceived
1.1.13
import Application from '@smartface/native/application';
Application.on(Application.Events.ApplicationCallReceived, (params) => {
console.info('onApplicationCallReceived', params);
});
Triggered when application is opened by an app shortcut. App shortcuts is also named Home Screen Quick Actions in iOS.
onAppShortcutReceived
4.3.6
import Application from '@smartface/native/application';
Application.on(Application.Events.appShortcutReceived, (params) => {
console.info('onAppShortcutReceived', params);
});
Data comes from extras of app shortcut intent in Android or UserInfo of app shortcut in iOS.
Triggered after application bring to foreground state. In Android, it triggered even the user is leaving another activity(even the activities launched by your app). That means Permissions & derived from Dialog components are makes this callback to triggered.
0.1 onMaximize
0.1
import Application from '@smartface/native/application';
Application.on(Application.Events.Maximize, () => {
console.info('onMaximize');
});
Triggered after application bring to background state. Background state means that user is in another app or on the home screen. In Android, it triggered even the user is launching another activity(even the activities launched by your app). That means Permissions & derived from Dialog components are make this callback to triggered.
0.1 onMinimize
0.1
import Application from '@smartface/native/application';
Application.on(Application.Events.Minimize, () => {
console.info('onMinimize');
});
Rest
...args: any[]Rest
...args: any[]Rest
...args: any[]Rest
...args: any[]Rest
...args: any[]Rest
...args: any[]Protected
Abstract
createProtected
preProtected
addProtected
addIOSPropsGenerated using TypeDoc
Since
0.1
A set of collection for application based properties and methods.