protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());

            //Register Adobe AEP Sdk's
            ACPCore.SetWrapperType(WrapperType.Xamarin);

            ACPCore.Application = this.Application;
            ACPPlaces.RegisterExtension();
            ACPSignal.RegisterExtension();

            ACPCore.Start(null);
            ACPCore.ConfigureWithAppID("{your-launch-id}");

            DependencyService.Register <IACPPlacesExtensionService, ACPPlacesExtensionService>();
        }
示例#2
0
    void Start()
    {
        if (Application.platform == RuntimePlatform.Android)
        {
            ACPCore.SetApplication();
        }
        ACPCore.SetLogLevel(ACPCore.ACPMobileLogLevel.VERBOSE);
        ACPCore.SetWrapperType();
        ACPIdentity.RegisterExtension();
        ACPUserProfile.RegisterExtension();
        ACPCore.Start(HandleStartAdobeCallback);

        var callbackResultsGameObject = GameObject.Find("CallbackResults");

        callbackResultsText = callbackResultsGameObject.GetComponent <Text>();

        btnExtensionVersion.onClick.AddListener(UserProfileExtensionVersion);
        btnGetUserAttributes.onClick.AddListener(GetUserAttributes);
        btnRemoveUserAttribute.onClick.AddListener(RemoveUserAttribute);
        btnRemoveUserAttributes.onClick.AddListener(RemoveUserAttributes);
        btnUpdateUserAttribute.onClick.AddListener(UpdateUserAttribute);
        btnUpdateUserAttributes.onClick.AddListener(UpdateUserAttributes);
    }
示例#3
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            // set the wrapper type
            ACPCore.SetWrapperType(ACPMobileWrapperType.Xamarin);

            // set log level
            ACPCore.LogLevel = ACPMobileLogLevel.Verbose;

            // register SDK extensions
            ACPLifecycle.RegisterExtension();
            ACPIdentity.RegisterExtension();
            ACPAnalytics.RegisterExtension();

            // start core
            ACPCore.Start(startCallback);

            // register dependency service to link interface from ACPCoreTestApp base project
            DependencyService.Register <IACPAnalyticsExtensionService, ACPAnalyticsExtensionService>();
            return(base.FinishedLaunching(app, options));
        }
        protected override void OnCreate(Bundle bundle)
        {
            // tests can be inside the main assembly
            AddTest(Assembly.GetExecutingAssembly());
            // or in any reference assemblies
            // AddTest (typeof (Your.Library.TestClass).Assembly);

            // Once you called base.OnCreate(), you cannot add more assemblies.
            base.OnCreate(bundle);

            // setup for all tests
            ACPCore.Application = this.Application;
            ACPCore.SetWrapperType(WrapperType.Xamarin);
            ACPCore.LogLevel = LoggingMode.Verbose;
            ACPIdentity.RegisterExtension();
            ACPSignal.RegisterExtension();
            ACPLifecycle.RegisterExtension();

            // start core
            ACPCore.Start(new CoreStartCompletionCallback());
            latch.Wait();
            latch.Dispose();
        }
        public void ClearQueue_Clears_QueuedHits()
        {
            // setup
            var   latch     = new CountdownEvent(1);
            nuint queueSize = 0;
            var   config    = new NSMutableDictionary <NSString, NSObject>
            {
                ["analytics.batchLimit"] = new NSNumber(5)
            };

            ACPCore.UpdateConfiguration(config);
            ACPCore.TrackAction("action", null);
            ACPCore.TrackAction("action", null);
            ACPCore.TrackAction("action", null);
            // test
            ACPAnalytics.GetQueueSize(callback =>
            {
                queueSize = callback;
                latch.Signal();
            });
            latch.Wait();
            latch.Dispose();
            // verify
            Assert.That(queueSize, Is.EqualTo(3));
            // test
            ACPAnalytics.ClearQueue();
            latch = new CountdownEvent(1);
            ACPAnalytics.GetQueueSize(callback =>
            {
                queueSize = callback;
                latch.Signal();
            });
            latch.Wait();
            latch.Dispose();
            // verify
            Assert.That(queueSize, Is.EqualTo(0));
        }
示例#6
0
 public void Setup()
 {
     ACPCore.SetPrivacyStatus(ACPMobilePrivacyStatus.OptIn);
 }
示例#7
0
 private void startCallback()
 {
     // set launch config
     ACPCore.ConfigureWithAppID("94f571f308d5/e30a9514788b/launch-44fec1a705f1-development");
 }
示例#8
0
 void getSdkIdentities()
 {
     print("Calling getSdkIdentities");
     ACPCore.GetSdkIdentities(HandleGetIdentitiesAdobeCallback);
 }
示例#9
0
 // Called when the application is launched and every time the app returns to the foreground.
 public override void OnActivated(UIApplication uiApplication)
 {
     base.OnActivated(uiApplication);
     ACPCore.LifecycleStart(null);
 }
示例#10
0
 public static void HandleStartAdobeCallback()
 {
     ACPCore.ConfigureWithAppID("launch-ENc28aaf2fb6934cff830c8d3ddc5465b1-development");
 }
示例#11
0
 void downloadRules()
 {
     print("Calling downloadRules");
     ACPCore.DownloadRules();
 }
示例#12
0
 partial void SetAdvertisingIdentifier(UIButton sender)
 {
     ACPCore.SetAdvertisingIdentifier("testAdvertisingIdentifier");
     Console.WriteLine("SetAdvertisingIdentifier Completed");
 }
示例#13
0
 partial void DownloadRules(UIButton sender)
 {
     ACPCore.DownloadRules();
     Console.WriteLine("DownloadRules Completed");
 }
示例#14
0
        //ACPCore
        partial void GetExtensionVersionCore(UIButton sender)
        {
            string extensionVersion = ACPCore.ExtensionVersion();

            Console.WriteLine("GetExtensionVersionCore: " + extensionVersion);
        }
示例#15
0
 partial void SetPrivacyStatus(UIButton sender)
 {
     ACPCore.SetPrivacyStatus(ACPMobilePrivacyStatus.OptIn);
     Console.WriteLine("SetPrivacyStatus Completed");
 }
示例#16
0
 private void startCallback()
 {
     // set launch config
     ACPCore.ConfigureWithAppID("launch-ENf8ed5382efc84d5b81a9be8dcc231be1-development");
 }
示例#17
0
 public void GetACPCoreExtensionVersion_Returns_CorrectVersion()
 {
     // verify
     Assert.That(ACPCore.ExtensionVersion(), Is.EqualTo("2.9.3-X"));
 }
 public void Call(Java.Lang.Object callback)
 {
     // set launch config
     ACPCore.ConfigureWithAppID("94f571f308d5/00fc543a60e1/launch-c861fab912f7-development");
 }
 public void Setup()
 {
     ACPAnalytics.ClearQueue();
     ACPCore.SetPrivacyStatus(ACPMobilePrivacyStatus.OptIn);
 }
 protected override void OnPause()
 {
     base.OnPause();
     ACPCore.LifecyclePause();
 }
示例#21
0
 public void TrackEvent(string eventName)
 {
     ACPCore.TrackAction(eventName, null);
 }
示例#22
0
 void getPrivacyStatus()
 {
     print("Calling getPrivacyStatus");
     ACPCore.GetPrivacyStatus(HandleAdobePrivacyStatusCallback);
 }
 protected override void OnResume()
 {
     base.OnResume();
     ACPCore.LifecycleStart(null);
 }
示例#24
0
        public void TrackEvent(string eventName, Dictionary <string, string> data)
        {
            var dictData = data.ToNativeDictionary();

            ACPCore.TrackAction(eventName, dictData);
        }
示例#25
0
 // ACPCore methods
 public TaskCompletionSource <string> GetExtensionVersionCore()
 {
     stringOutput = new TaskCompletionSource <string>();
     stringOutput.SetResult(ACPCore.ExtensionVersion());
     return(stringOutput);
 }
示例#26
0
        public void TrackState(string screenName, Dictionary <string, string> additionalContextData)
        {
            var dictData = additionalContextData?.ToNativeDictionary();

            ACPCore.TrackState(screenName, dictData);
        }
示例#27
0
 public void Call(Java.Lang.Object callback)
 {
     // set launch config
     ACPCore.ConfigureWithAppID("launch-ENf8ed5382efc84d5b81a9be8dcc231be1-development");
 }
示例#28
0
 public static void HandleStartAdobeCallback()
 {
     print(LOG_TAG + "HandleStartAdobeCallback");
     ACPCore.ConfigureWithAppID("94f571f308d5/00fc543a60e1/launch-c861fab912f7-development");
 }
示例#29
0
 // Called when the application is about to enter the background, be suspended, or when the user receives an interruption such as a phone call or text.
 public override void OnResignActivation(UIApplication uiApplication)
 {
     base.OnResignActivation(uiApplication);
     ACPCore.LifecyclePause();
 }
示例#30
0
 void setAdvertisingIdentifier()
 {
     print("Calling setAdvertisingIdentifier");
     ACPCore.SetAdvertisingIdentifier("AdId");
 }