Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.56 KB | None | 0 0
  1. @NativeClass
  2. public class AppsFlyerTracker extends NSObject {
  3.  
  4.     interface AppsFlyerTrackerDelegate {
  5. //      - (void) onConversionDataReceived:(NSDictionary*) installData;
  6.         @Method(selector = "onConversionDataReceived:")
  7.         void onConversionDataReceived(NSDictionary installData);
  8.  
  9. //      - (void) onConversionDataRequestFailure:(NSError *)error;
  10.         @Method(selector = "onConversionDataRequestFailure:")
  11.         void onConversionDataRequestFailure(NSError error);
  12.  
  13. //      - (void) onAppOpenAttribution:(NSDictionary*) attributionData;
  14.         @Method(selector = "onAppOpenAttribution:")
  15.         void onAppOpenAttribution(NSDictionary attributionData);
  16.  
  17. //      - (void) onAppOpenAttributionFailure:(NSError *)error;
  18.         @Method(selector = "onAppOpenAttributionFailure:")
  19.         void onAppOpenAttributionFailure(NSError error);
  20.  
  21.     }
  22.  
  23. //  @property(nonatomic, assign) NSObject<GADBannerViewDelegate> *delegate
  24. //  When binding delegate properties or other weak/assign properties, we need to retain a strong reference of them, otherwise we will get memory issues and app crashes:
  25. //
  26. //  @Property(selector = "delegate")
  27. //  public native GADBannerViewDelegate getDelegate();
  28. //
  29. //  @Property(selector = "setDelegate:", strongRef = true)
  30. //  public native void setDelegate(GADBannerViewDelegate delegate);
  31.  
  32. /* Use this property to set your AppsFlyer's dev key. */
  33. //  @property (nonatomic, strong, setter=setAppsFlyerDevKey:) NSString *appsFlyerDevKey;
  34.     @Property(selector = "appsFlyerDevKey")
  35.     public native String getAppsFlyerDevKey();
  36.  
  37.     @Property(selector = "setAppsFlyerDevKey:", strongRef = true)
  38.     public native void setAppsFlyerDevKey(String appsFlyerDevKey);
  39.  
  40. /* Use this property to set your app's Apple ID (taken from the app's page on iTunes Connect) */
  41. //  @property (nonatomic, strong, setter=setAppleAppID:) NSString *appleAppID;
  42.     @Property(selector = "appleAppID")
  43.     public native String getAppleAppID();
  44.  
  45.     @Property(selector = "setAppleAppID:", strongRef = true)
  46.     public native void setAppleAppID(String appleAppID);
  47.  
  48. //+(AppsFlyerTracker*) sharedTracker;
  49.     @Method(selector = "sharedTracker:")
  50.     public static native AppsFlyerTracker sharedTracker();
  51.  
  52.     ///* Track application launch*/
  53. //  - (void) trackAppLaunch;
  54.     @Method(selector = "trackAppLaunch:")
  55.     public native void trackAppLaunch();
  56.  
  57. /*
  58.  * Use this method to track an events with mulitple values. See AppsFlyer's documentation for details.
  59.  *
  60.  */
  61. //  - (void) trackEvent:(NSString *)eventName withValues:(NSDictionary*)values;
  62.     @Method(selector = "trackEvent:values")
  63.     public native void trackEvent(NSString eventName, NSDictionary values);
  64.  
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement