Delegate to receive events from the keyboard.
FKInterfaceDelegate depend on the creation of the KeyboardViewController.
Method | Description |
---|---|
eventBus | Invoked when we receive a notification subscribed. |
sesssionStarted | Invoked at the beginning of data collection data. |
sesssionEnded | Invoked at the end of data collection data. |
dataCollection | Invoked at the end of the session with all data captured. |
dataCollectionFromDict | Invoked at the end of the session with all data captured, format dictionary. |
onDataCaptureEvent | Invoked when the event-based data capture is enabled. |
reportAnalytics | Invoked at the end of the session with all internal analytics reported. |
contextPropertiesChanged | Invoked at the beginning of the session with the properties. |
onLayoutChanges | Invoked when we start up the keyboard and every time the layout changes. |
triggerOpenApp | Invoked when the button on the topbar is pressed. |
- (void) eventBus:(NSString *)event payload:(NSDictionary *)dictPayload;
Called when a notification is triggered by the SDK. Notification with name: event, and payload: dictPayload. Specification of events and payload in subscribeEventBus description.
- (void) sessionStarted:(NSString *)sessionId;
Implement this method to get notified that a new keyboard session started.
- (void) sessionEnded:(NSString *)sessionId;
Implement this method to get notified that an existing keyboard session ended.
- (void) dataCollection:(NSString *)data sessionId:(NSString *)sessionId;
Called when we are ready to report data collected during the session. This method receives data in string format. Data Component explains in detail the data collected.
- (void)dataCollectionFormatDict:(NSDictionary *)data sessionId:(NSString *)sessionId;
Called when we are ready to report data collected during the session formatted as a dictionary. Data Component explains in detail the data collected.
override func onDataCaptureEvent(_ event: EventBasedDataCaptureEvent) {
}
This method reports all different changes on the data capture while it happens. To enable this method you need two different elements:
keyboardConfiguration
with the Event-based data captureYou can check all different data elements that the system will start to report to you.
- (void) reportAnalytics:(NSDictionary *)data;
Called when we are about to close the keyboard with all the data, collected during the session. This should be enabled with this setting: FLEKSY_SETTINGS_REPORT_ANALYTICS, by default this is disabled.
data is a dictionary with different internal analytics that might be relevant.
Keys of first level:
Key | Object | Description |
---|---|---|
correction | <dictionary> | All specific analytics for auto correction. |
Keys second level, Key correction:
Key | Object | Description |
---|---|---|
none | <number> | Number of words not corrected. |
missingSpace | <number> | Number of corrections done due to missing a space. |
missTypedSpace | <number> | Number of corrections done due to typing an unwanted space. |
eliminated | <number> | Number of corrections done to eliminate characters. |
transposition | <number> | Number of corrections done by changing the order or characters. |
missingTaps | <number> | Number of corrections done when a word misses taps (characters). |
others | <number> | Number of corrections not related to all other cases. This includes corrections directly from the dictionary and other outcome types. |
Example:
@{@"correction":@{@"none":2,
@"missingSpace":0,
@"missTypedSpace":1,
@"eliminated":2,
@"transposition":0,
@"missingTap":3,
@"others":1}};
- (void) contextPropertiesChanged:(KeyboardProperties*) properties;
Called when the keyboard is opened or when some of the KeyboardProperties change during the current session.
KeyboardProperties elements:
appName | String with the name of the current app where the user is executed. |
textFieldType | UIKeyboardType with the current textfield type. |
- (void) onLayoutChanges:(NSDictionary*)dictLayout;
Called when the layout changes the keys/positions.
Note:
Parameters:
layout | Holds an Array of FleksyDebugLayoutSDK, which contains frame, element and type. |
suggestions | Holds an Array of FleksyDebugLayoutSDK, which contains frame, element and type. |
keyboardArea | Holds an object of FleksyDebugRectSDK for the keyboardArea based on the device points. It gives x,y, width, height of the whole keyboard area. |
- (void) triggerOpenApp;
Called when button on the topbar is pressed. Any action can be performed here.