File tree Expand file tree Collapse file tree
Assets/TalkingDataScripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,7 +163,6 @@ public static class TalkingDataSDK
163163 private static extern void TDOnTrialFinished ( string profileId , string content ) ;
164164#endif
165165
166- #if TD_CUSTOM
167166 [ DllImport ( "__Internal" ) ]
168167 private static extern void TDOnEvent ( string eventId , double eventValue , string parameters ) ;
169168
@@ -173,7 +172,6 @@ public static class TalkingDataSDK
173172 [ DllImport ( "__Internal" ) ]
174173 private static extern void TDRemoveGlobalKV ( string key ) ;
175174#endif
176- #endif
177175
178176#if UNITY_ANDROID
179177 private static AndroidJavaObject GetCurrentActivity ( )
@@ -938,7 +936,10 @@ public static void SetGlobalKV(string key, object val)
938936#if UNITY_ANDROID
939937 if ( talkingdataClass != null )
940938 {
941- talkingdataClass . CallStatic ( "setGlobalKV" , key , val ) ;
939+ AndroidJavaObject valObject = typeof ( string ) . IsInstanceOfType ( val )
940+ ? new AndroidJavaObject ( "java.lang.String" , val )
941+ : new AndroidJavaObject ( "java.lang.Double" , "" + val ) ;
942+ talkingdataClass . CallStatic ( "setGlobalKV" , key , valObject ) ;
942943 }
943944#endif
944945#if UNITY_IPHONE
You can’t perform that action at this time.
0 commit comments