@@ -93,7 +93,7 @@ export function logComplexEvent(options: LogComplexEventOptions): Promise<void>
9393 }
9494
9595 com . google . firebase . analytics . FirebaseAnalytics . getInstance (
96- appModule . android . currentContext || com . tns . NativeScriptApplication . getInstance ( )
96+ appModule . android . context || com . tns . NativeScriptApplication . getInstance ( )
9797 ) . logEvent ( options . key , bundle ) ;
9898
9999 resolve ( ) ;
@@ -112,7 +112,8 @@ export function setUserId(arg): Promise<void> {
112112 return ;
113113 }
114114
115- com . google . firebase . analytics . FirebaseAnalytics . getInstance ( appModule . android . currentContext || com . tns . NativeScriptApplication . getInstance ( ) ) . setUserId ( arg . userId ) ;
115+ com . google . firebase . analytics . FirebaseAnalytics . getInstance (
116+ appModule . android . context || com . tns . NativeScriptApplication . getInstance ( ) ) . setUserId ( arg . userId ) ;
116117
117118 resolve ( ) ;
118119 } catch ( ex ) {
@@ -135,7 +136,7 @@ export function setUserProperty(options: SetUserPropertyOptions): Promise<void>
135136 }
136137
137138 com . google . firebase . analytics . FirebaseAnalytics . getInstance (
138- appModule . android . currentContext || com . tns . NativeScriptApplication . getInstance ( )
139+ appModule . android . context || com . tns . NativeScriptApplication . getInstance ( )
139140 ) . setUserProperty ( options . key , options . value ) ;
140141
141142 resolve ( ) ;
@@ -155,7 +156,7 @@ export function setScreenName(options: SetScreenNameOptions): Promise<void> {
155156 }
156157
157158 com . google . firebase . analytics . FirebaseAnalytics . getInstance (
158- appModule . android . currentContext || com . tns . NativeScriptApplication . getInstance ( )
159+ appModule . android . context || com . tns . NativeScriptApplication . getInstance ( )
159160 ) . setCurrentScreen ( appModule . android . foregroundActivity , options . screenName , null ) ;
160161
161162 resolve ( ) ;
@@ -168,12 +169,12 @@ export function setScreenName(options: SetScreenNameOptions): Promise<void> {
168169
169170export function setAnalyticsCollectionEnabled ( enabled : boolean ) : void {
170171 com . google . firebase . analytics . FirebaseAnalytics . getInstance (
171- appModule . android . currentContext || com . tns . NativeScriptApplication . getInstance ( )
172+ appModule . android . context || com . tns . NativeScriptApplication . getInstance ( )
172173 ) . setAnalyticsCollectionEnabled ( enabled ) ;
173174}
174175
175176export function setSessionTimeoutDuration ( seconds : number ) : void {
176177 com . google . firebase . analytics . FirebaseAnalytics . getInstance (
177- appModule . android . currentContext || com . tns . NativeScriptApplication . getInstance ( )
178+ appModule . android . context || com . tns . NativeScriptApplication . getInstance ( )
178179 ) . setSessionTimeoutDuration ( seconds * 1000 ) ; // Android expects ms
179180}
0 commit comments