MOBILE-2957 config: Add variable to enable analytics
parent
5810946b96
commit
4a913ce0ab
|
@ -80,5 +80,6 @@
|
|||
"statusbarbgandroid": "#df7310",
|
||||
"statusbarlighttextandroid": true,
|
||||
"statusbarbgremotetheme": "#000000",
|
||||
"statusbarlighttextremotetheme": true
|
||||
"statusbarlighttextremotetheme": true,
|
||||
"enableanalytics": false
|
||||
}
|
||||
|
|
|
@ -303,7 +303,7 @@ export class CorePushNotificationsProvider {
|
|||
logEvent(name: string, data: any, filter?: boolean): Promise<any> {
|
||||
const win = <any> window; // This feature is only present in our fork of the plugin.
|
||||
|
||||
if (win.PushNotification && win.PushNotification.logEvent) {
|
||||
if (CoreConfigConstants.enableanalytics && win.PushNotification && win.PushNotification.logEvent) {
|
||||
return new Promise((resolve, reject): void => {
|
||||
win.PushNotification.logEvent(resolve, (error) => {
|
||||
this.logger.error('Error logging firebase event', name, error);
|
||||
|
|
Loading…
Reference in New Issue