If the app calls the trackFeatureEvent API to record a Feature Inactive event after the app enters background, the BAFFeaturetNotFound response is returned.
Event Type
|
iOS
(BAFAnalyticsEvent)
|
Description
|
FeatureActive
|
BAFFeatureActive
|
To record feature active event
|
FeatureInactive
|
BAFFeatureInactive
|
To record feature inactive event
|
AdoptionEvent
|
BAFAdoptionEvent
|
To record adoption event.
|
These events can be done with the following code.
Obj-C
[BAFBlackberryAnalytics trackFeatureEvent:BAFFeatureActive
withFeatureName:@"EventName" completion:^(NSError *error) {
NSLog(@"%@",[error localizedDescription]);
}];
[BAFBlackberryAnalytics trackFeatureEvent:BAFFeatureInactive
withFeatureName:@"EventName" completion:^(NSError *error) {
NSLog(@"%@",[error localizedDescription]);
}];
[BAFBlackberryAnalytics trackApplicationEvent:BAFAdoptionEvent withValue:@"Value"
forKey:@"Key" completion:^(NSError *error) {
NSLog(@"%@",[error localizedDescription]); }];
Swift
BAFBlackberryAnalytics.trackApplicationEvent(.adoptionEvent, withValue: "Value", forKey:
"Key", completion: { (error) in
})
BAFBlackberryAnalytics.trackFeatureEvent(.featureActive, withFeatureName:
"EventName", completion: { (error) in
})
BAFBlackberryAnalytics.trackFeatureEvent(.featureInactive, withFeatureName:
"EventName", completion: { (error) in
})