Beispiel #1
0
        public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity, Dictionary <string, object> properties)
        {
            var javaPrice = new AndroidJavaObject("java.math.BigDecimal", price.ToString());
            AndroidJavaObject appboyProperties = ParsePropertiesToAppboyProperties(properties);

            Appboy.Call("logPurchase", productId, currencyCode, javaPrice, quantity, appboyProperties);
        }
Beispiel #2
0
        public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity)
        {
            object[]          args = new object[] { price.ToString() };
            AndroidJavaObject obj2 = new AndroidJavaObject("java.math.BigDecimal", args);

            object[] objArray2 = new object[] { productId, currencyCode, obj2, quantity };
            Appboy.Call <bool>("logPurchase", objArray2);
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            // Code for starting up the Xamarin Test Cloud Agent
      #if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
      #endif

            LoadApplication(new App());

            // Start Appboy
            Appboy.StartWithApiKey("09aa7156-9aef-4043-acfa-424d0dbc3d80", UIApplication.SharedApplication, options);
            Appboy.SharedInstance.SdkFlavor = ABKSDKFlavor.Xamarin;

            // Subscribe to notification
            NSNotificationCenter.DefaultCenter.AddObserver(ABKFeedController.ABKFeedUpdatedNotification, OnFeedUpdated);

            return(base.FinishedLaunching(app, options));
        }
Beispiel #4
0
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            initialViewController     = Storyboard.InstantiateInitialViewController() as UIViewController;
            Window.RootViewController = initialViewController;

            // make the window visible
            Window.MakeKeyAndVisible();

            // Start Appboy
            Appboy.StartWithApiKey("09aa7156-9aef-4043-acfa-424d0dbc3d80", UIApplication.SharedApplication, options);
            Appboy.SharedInstance.SdkFlavor = ABKSDKFlavor.Xamarin;

            if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0))
            {
                UNUserNotificationCenter.Current.RequestAuthorization(UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound, (approved, err) =>
                {
                    Console.WriteLine("Permission granted");
                });

                notificationsDelegate = new UserNotificationsDelegate();
                UNUserNotificationCenter.Current.Delegate = notificationsDelegate;
                UIApplication.SharedApplication.RegisterForRemoteNotifications();
            }
            else
            {
                // Settings for Appboy push
                UIUserNotificationSettings settings = UIUserNotificationSettings.GetSettingsForTypes(UIUserNotificationType.Badge | UIUserNotificationType.Alert | UIUserNotificationType.Sound, null);
                UIApplication.SharedApplication.RegisterForRemoteNotifications();
                UIApplication.SharedApplication.RegisterUserNotificationSettings(settings);
            }

            return(true);
        }
Beispiel #5
0
        /// <summary>
        /// Logs a custom event for the user with the given properties.
        /// </summary>
        /// <param name='eventName'>
        /// The name of the custom event.
        /// </param>
        /// <param name='properties'>
        /// A properties dictionary.  Values that are int/string/double/bool/DateTime will be passed to Android
        /// and mapped to java types.  All other values will be passed as strings.
        /// </param>
        public static void LogCustomEvent(string eventName, Dictionary <string, object> properties)
        {
            AndroidJavaObject appboyProperties = ParsePropertiesToAppboyProperties(properties);

            Appboy.Call("logCustomEvent", eventName, appboyProperties);
        }
Beispiel #6
0
 private static AndroidJavaObject GetCurrentUser()
 {
     return(Appboy.Call <AndroidJavaObject>("getCurrentUser"));
 }
Beispiel #7
0
 public static void LogCustomEvent(string eventName)
 {
     Appboy.Call("logCustomEvent", eventName);
 }
 /// <summary>
 /// Requests a refresh of Braze Geofences for the specified GPS coordinate.
 /// </summary>
 /// <param name='latitude'>
 /// A valid GPS latitude in range (-90, 90).
 /// </param>
 /// <param name='longitude'>
 /// A valid GPS longitude in range (-180, 180).
 /// </param>
 /// </summary>
 public static void RequestGeofences(decimal latitude, decimal longitude)
 {
     Appboy.Call("requestGeofences", latitude, longitude);
 }
Beispiel #9
0
        public static void LogContentCardDismissed(string contentCardString)
        {
            var contentCard = Appboy.Call <AndroidJavaObject>("deserializeContentCard", contentCardString);

            contentCard.Call <bool>("setIsDismissed", true);
        }
        public static void LogContentCardClicked(string contentCardString)
        {
            var contentCard = Appboy.Call <AndroidJavaObject>("deserializeContentCard", contentCardString);

            contentCard.Call <bool>("logClick");
        }
Beispiel #11
0
 public static void DisableSDK()
 {
     Appboy.CallStatic("disableSdk", appboyUnityActivity);
 }
Beispiel #12
0
 public static void ChangeUser(string userId)
 {
     Appboy.Call("changeUser", userId);
 }
Beispiel #13
0
 public static void RequestFeedRefresh()
 {
     Appboy.Call("requestFeedRefresh");
 }
Beispiel #14
0
 public static void RequestFeedRefresh()
 {
     Appboy.Call("requestFeedRefresh", new object[0]);
 }
Beispiel #15
0
 public static void RequestFeedRefreshFromCache()
 {
     Appboy.Call("requestFeedRefreshFromCache", new object[0]);
 }
 public static void RequestContentCardsRefreshFromCache()
 {
     Appboy.Call("requestContentCardsRefresh", true);
 }
 public static void RequestContentCardsRefresh()
 {
     Appboy.Call("requestContentCardsRefresh", false);
 }
 public static void LogContentCardsDisplayed()
 {
     Appboy.Call("logContentCardsDisplayed");
 }
Beispiel #19
0
        public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity)
        {
            var javaPrice = new AndroidJavaObject("java.math.BigDecimal", price.ToString());

            Appboy.Call("logPurchase", productId, currencyCode, javaPrice, quantity);
        }
Beispiel #20
0
 public static void LogFeedDisplayed()
 {
     Appboy.Call("logFeedDisplayed");
 }
Beispiel #21
0
 public static void RequestSlideup()
 {
     Appboy.Call("requestInAppMessageRefresh", new object[0]);
 }
 public static void RequestImmediateDataFlush()
 {
     Appboy.Call("requestImmediateDataFlush");
 }
Beispiel #23
0
 public static void RegisterAppboyPushMessages(string registrationId)
 {
     Appboy.Call("registerAppboyPushMessages", new object[] { registrationId });
 }
Beispiel #24
0
 public static void ChangeUser(string userId)
 {
     object[] args = new object[] { userId };
     Appboy.Call <AndroidJavaObject>("changeUser", args);
 }
Beispiel #25
0
 public static void RequestFeedRefreshFromCache()
 {
     Appboy.Call("requestFeedRefreshFromCache");
 }
Beispiel #26
0
 public static void SubmitFeedback(string replyToEmail, string message, bool isReportingABug)
 {
     object[] args = new object[] { replyToEmail, message, isReportingABug };
     Appboy.Call <bool>("submitFeedback", args);
 }
Beispiel #27
0
 public static void WipeData()
 {
     Appboy.CallStatic("wipeData", appboyUnityActivity);
 }
Beispiel #28
0
 public static void LogCustomEvent(string eventName)
 {
     object[] args = new object[] { eventName };
     Appboy.Call <bool>("logCustomEvent", args);
 }
Beispiel #29
0
 public static string GetInstallTrackingId()
 {
     return(Appboy.Call <string>("getInstallTrackingId"));
 }
Beispiel #30
0
 public static void LogFeedDisplayed()
 {
     Appboy.Call <bool>("logFeedDisplayed", new object[0]);
 }