--- title: "Whatfix Mobile Callbacks einrichten" slug: "setup-whatfix-mobile-callbacks" updated: 2024-06-06T09:26:43Z published: 2024-06-06T09:26:43Z canonical: "support.whatfix.com/setup-whatfix-mobile-callbacks" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.whatfix.com/llms.txt > Use this file to discover all available pages before exploring further. # Whatfix Mobile Callbacks einrichten Immer wenn ein Endbenutzer mit Walkthroughs oder anderen Whatfix Mobile Elementen interagiert, werden Ereignisse generiert, um die Insights zu verfolgen. your title goes here Sie können alle Ereignisse in Ihrer `Anwendung (Android) / AppDelegate (iOS) `Klasse anhören. Verwenden Sie den folgenden Code-Snippet, um die Benutzer-IDs an Whatfix Mobile zu übergeben, Android ## Android ```java import is.leap.android. eapEventListener; public class MyApplication extends Application { @Override public void onCreate() { LeapEventCallListener eventListener = new LeapEventCallbacks() { @Override public void onEvent(Map eventData) { } }; Sprung. etLeapEventCallbacks(eventListener); } } ``` Swift ## iOS-Swift ```swift Leap.shared.callback = self extension AppDelegate:LeapCallback { func eventNotification(eventInfo: Dictionary) { } } ``` Objective-C ## iOS Objective-C ```objectivec @interface AppDelegate () Leap.shared.callback = self; - (void)eventNotificationWithEventInfo:(NSDictionary *)eventInfo { } ``` ReactNative ## ReactNative ```javascript import { NativeEventEmitter } from 'react-native'; export class App extends React.Component { componentDidMount() { // Register for callbacks const eventEmitter = new NativeEventEmitter(LeapReactNative); const onSessionConnect = (event) => { console.log(event); } eventEmitter.addListener('LeapCallbacks', onSessionConnect); } } ``` Cordova (Android) ## Cordova (Android) ```javascript cordova.plugins.LeapAndroid.setLeapEventCallback((leapEvent)=> { console.log(JSON.stringify(leapEvent, null, 2)) }) ``` Cordova (iOS) ## Cordova (iOS) ```javascript cordova.plugins.LeapiOS.setLeapEventCallback((leapEvent) =>{ console.log(JSON.stringify(leapEvent, null, 2)); }) ``` Xamarin Android ## Xamarin Android ```java mit statischem IS.Leap.Android.ILeapEventCallbacks verwenden mit IS.Leap.Android; public class MainActivity : AppCompatActivity, ILeapEventCallbacks { protected override void OnCreate(Bundle savedInstanceState){ Leap.SetLeapEventCallbacks(eventCallbacks: this); } public void OnEvent(IDictionary keyValues) { } } ``` Xamarin iOS ## Xamarin iOS ```javascript public class AppDelegate : UIResponder, IUIApplicationDelegate { private LeapEventsCallback callback = null; public bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { Leap.Shared.Start("f4f460a6-9e04-4114-9da4-410659427c6a"); callback = new LeapEventsCallback(); Leap.Shared.SetCallback(callback); return true; } } public class LeapEventsCallback : LeapCallback { public override void EventNotificationWithEventInfo(NSDictionary eventInfo) { System.Diagnostics.Debug.WriteLine(eventInfo); } } ``` Ionic ## Ionic Das folgende Code-Snippet muss hinzugefügt werden, wo die App-Komponente gerendert wird. ```javascript LeapPlugin.start({apiKey:""}); LeapPlugin.addListener("leapCallbacks", (Event: LeapCallbacks) => { console.log("Leap Events: ", event); }) ```