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

            base.OnCreate(savedInstanceState);

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

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

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

            // set application
            ACPCore.Application = this.Application;
            // Set the activity in core using the bridge
            ACPCoreBridge.SetCurrentActivity((Activity)Forms.Context);
            // register SDK extensions
            ACPLifecycle.RegisterExtension();
            ACPIdentity.RegisterExtension();
            AEPAssurance.RegisterExtension();

            // start core
            ACPCore.Start(new CoreStartCompletionCallback());

            // register dependency service to link interface from AEPAssuranceTestApp base project
            DependencyService.Register <IAEPAssuranceExtensionService, AEPAssuranceExtensionService>();
        }
    public void getAssuranceExtensionVersion()
    {
        string version = AEPAssurance.ExtensionVersion();

        print(LOG_TAG + "Assurance version: " + version);
        resultText.text = "Assurance Version: " + version;
    }
Example #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)
        {
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            runner = new TouchRunner(window);

            // register every tests included in the main application/assembly
            runner.Add(System.Reflection.Assembly.GetExecutingAssembly());

            window.RootViewController = new UINavigationController(runner.GetViewController());

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

            // setup for all tests
            CountdownEvent latch = new CountdownEvent(1);

            ACPCore.LogLevel = ACPMobileLogLevel.Verbose;
            AEPAssurance.RegisterExtension();

            // start core
            ACPCore.Start(() =>
            {
                ACPCore.ConfigureWithAppID("94f571f308d5/00fc543a60e1/launch-c861fab912f7-development");
                latch.Signal();
            });
            latch.Wait();
            latch.Dispose();

            return(true);
        }
 public TaskCompletionSource <string> StartSession()
 {
     stringOutput = new TaskCompletionSource <string>();
     if (sessionUrl.Length > 0)
     {
         AEPAssurance.StartSession(sessionUrl);
     }
     else
     {
         Console.WriteLine("Invalid session url");
     }
     stringOutput.SetResult("");
     return(stringOutput);
 }
    // Start is called before the first frame update
    void Start()
    {
        print(LOG_TAG + "Start called");
        if (Application.platform == RuntimePlatform.Android)
        {
            ACPCore.SetApplication();
        }

        ACPCore.SetWrapperType();
        bool hasRegistered = AEPAssurance.RegisterExtension();

        resultText.text = "Assurance Registered:: " + hasRegistered.ToString();
        ACPCore.Start(HandleStartAdobeCallback);

        btnAssuranceStartSession.onClick.AddListener(startAssuranceSession);
        btnAssuranceExtensionVersion.onClick.AddListener(getAssuranceExtensionVersion);
    }
        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.LogLevel    = LoggingMode.Verbose;
            AEPAssurance.RegisterExtension();

            // start core
            ACPCore.Start(new CoreStartCompletionCallback());
            latch.Wait();
            latch.Dispose();
        }
Example #7
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();
            AEPAssurance.RegisterExtension();

            // start core
            ACPCore.Start(startCallback);

            // register dependency service to link interface from ACPCoreTestApp base project
            DependencyService.Register <IAEPAssuranceExtensionService, AEPAssuranceExtensionService>();

            return(base.FinishedLaunching(app, options));
        }
Example #8
0
 // AEPAssurance methods
 public TaskCompletionSource <string> GetExtensionVersionAssurance()
 {
     stringOutput = new TaskCompletionSource <string>();
     stringOutput.SetResult(AEPAssurance.ExtensionVersion());
     return(stringOutput);
 }
Example #9
0
 // Handle app open from url scheme of aepassurancetestApp://link
 public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
 {
     AEPAssurance.StartSession(url);
     return(false);
 }
    //Assurance plugin methods.
    public void startAssuranceSession()
    {
        const string url = "griffon://?adb_validation_sessionid=6b55294e-32d4-49e8-9279-e3fe12a9d309";

        AEPAssurance.StartSession(url);
    }
 public void GetAEPAssuranceExtensionVersion_Returns_CorrectVersion()
 {
     // verify
     Assert.That(AEPAssurance.ExtensionVersion(), Is.EqualTo("1.0.0"));
 }