partial void SendOutcomeWithValue(UIButton sender)
        {
            string name  = OutcomeValueKey.Text;
            float  value = float.Parse(OutcomeValue.Text);

            SharedPush.SendOutcomeWithValue(name, value);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            SharedPush.Initialize();

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById <Button>(Resource.Id.myButton);

            button.Click += delegate
            {
                button.Text = $"{count++} clicks!";
                System.Diagnostics.Debug.WriteLine("Button clicked");
            };

            Switch consentButton = FindViewById <Switch>(Resource.Id.consentSwitch);

            consentButton.CheckedChange += (o, e) =>
            {
                SharedPush.ConsentStatusChanged(consentButton.Checked);
                System.Diagnostics.Debug.WriteLine("Changing consent state");
            };

            consentButton.Checked = SharedPush.UserDidProvideConsent();
        }
Beispiel #3
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            SharedPush.Initialize();

            return(true);
        }
Beispiel #4
0
        partial void SendUniqueOutcome(UIButton sender)
        {
            if (string.IsNullOrWhiteSpace(UniqueOutcomeKey.Text))
            {
                return;
            }
            string name = UniqueOutcomeKey.Text;

            SharedPush.SendUniqueOutcome(name);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            PrivacyConsentControl.SelectedSegment = SharedPush.UserDidProvideConsent() ? 1 : 0;

            UITextField externalIdField = (UITextField)this.View.ViewWithTag(3);

            externalIdField.Delegate = textDelegate;
        }
Beispiel #6
0
        partial void SendOutcomeWithValue(UIButton sender)
        {
            if (string.IsNullOrWhiteSpace(OutcomeValueKey.Text) || string.IsNullOrWhiteSpace(OutcomeValue.Text))
            {
                return;
            }
            string name  = OutcomeValueKey.Text;
            float  value = float.Parse(OutcomeValue.Text);

            SharedPush.SendOutcomeWithValue(name, value);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();


            // Perform any additional setup after loading the view, typically from a nib.
            Button.AccessibilityIdentifier = "myButton";
            Button.TouchUpInside          += delegate
            {
                SharedPush.RegisterIOS();
            };
        }
Beispiel #8
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();


            // Perform any additional setup after loading the view, typically from a nib.
            Button.AccessibilityIdentifier = "myButton";
            Button.TouchUpInside          += delegate
            {
                SharedPush.RegisterIOS();
            };

            PrivacyConsentControl.SelectedSegment = SharedPush.UserDidProvideConsent() ? 1 : 0;
        }
Beispiel #9
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            SubscribedSwitch.ValueChanged += delegate {
                if (SubscribedSwitch.On)
                {
                    SharedPush.Subscribe();
                }
                else
                {
                    SharedPush.Unsubscribe();
                }
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            SharedPush.Initialize();

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById <Button>(Resource.Id.myButton);

            button.Click += delegate
            {
                button.Text = $"{count++} clicks!";
                System.Diagnostics.Debug.WriteLine("Button clicked");
            };

            Switch consentButton = FindViewById <Switch>(Resource.Id.consentSwitch);

            consentButton.CheckedChange += (o, e) =>
            {
                SharedPush.ConsentStatusChanged(consentButton.Checked);

                System.Diagnostics.Debug.WriteLine("Changing consent state");
            };

            consentButton.Checked = OneSignal.Default.PrivacyConsent;

            Button setExternalIdButton = FindViewById <Button>(Resource.Id.setExternalIdButton);

            TextView externalIdField = FindViewById <TextView>(Resource.Id.externalIdField);

            setExternalIdButton.Click += delegate
            {
                OneSignal.Default.SetExternalUserId(externalIdField.Text);
            };

            Button removeExternalIdButton = FindViewById <Button>(Resource.Id.removeExternalIdButton);

            removeExternalIdButton.Click += delegate
            {
                OneSignal.Default.RemoveExternalUserId();
            };
        }
Beispiel #11
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            SharedPush.Initialize();

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById <Button>(Resource.Id.myButton);

            button.Click += delegate
            {
                button.Text = $"{count++} clicks!";
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Main);

            SharedPush.Initialize();

            Switch pushSwitch = FindViewById <Switch>(Resource.Id.pushSwitch);


            pushSwitch.CheckedChange += delegate
            {
                if (pushSwitch.Checked)
                {
                    SharedPush.Subscribe();
                }
                else
                {
                    SharedPush.Unsubscribe();
                }
            };
        }
Beispiel #13
0
 partial void RemoveExternalUserId(UIButton sender)
 {
     SharedPush.RemoveExternalUserId();
 }
Beispiel #14
0
        partial void SetExternalUserId(UIButton sender)
        {
            UITextField externalIdField = (UITextField)this.View.ViewWithTag(3);

            SharedPush.SetExternalUserId(externalIdField.Text);
        }
Beispiel #15
0
 partial void ConsentChanged(UISegmentedControl sender)
 {
     SharedPush.ConsentStatusChanged(sender.SelectedSegment == 1);
 }
        partial void SendUniqueOutcome(UIButton sender)
        {
            string name = UniqueOutcomeKey.Text;

            SharedPush.SendUniqueOutcome(name);
        }
 partial void RegisterForPush(UIButton sender)
 {
     SharedPush.RegisterIOS();
 }