partial void GetExperienceCloudId(UIButton sender) { var callback = new Action <NSString>(handleCallback); ACPIdentity.GetExperienceCloudId(callback); Console.WriteLine("GetExperienceCloudId Completed"); }
// // 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; ACPAnalytics.RegisterExtension(); ACPIdentity.RegisterExtension(); ACPLifecycle.RegisterExtension(); // start core ACPCore.Start(() => { ACPCore.ConfigureWithAppID("94f571f308d5/00fc543a60e1/launch-c861fab912f7-development"); latch.Signal(); }); latch.Wait(); latch.Dispose(); return(true); }
public void TestAppendVisitorInfoForUrl_Returns_AppendedUrl() { // setup Thread.Sleep(1000); CountdownEvent latch = new CountdownEvent(2); string urlString = null; string ecid = null; string orgid = new NSString("972C898555E9F7BC7F000101%40AdobeOrg"); NSUrl url = new NSUrl("https://test.com"); // test ACPIdentity.GetExperienceCloudId(ecidCallback => { ecid = ecidCallback.ToString(); latch.Signal(); ACPIdentity.AppendToUrl(url, callback => { urlString = callback.ToString(); latch.Signal(); }); }); latch.Wait(); latch.Dispose(); // verify Assert.That(urlString, Is.StringContaining(url.ToString())); Assert.That(urlString, Is.StringContaining(ecid)); Assert.That(urlString, Is.StringContaining(orgid)); }
partial void GetIdentifiers(UIButton sender) { var callback = new Action <ACPMobileVisitorId[]>(handleCallback); ACPIdentity.GetIdentifiers(callback); Console.WriteLine("GetIdentifiers Completed"); }
partial void GetUrlVariables(UIButton sender) { var callback = new Action <NSString>(handleCallback); ACPIdentity.GetUrlVariables(callback); Console.WriteLine("GetUrlVariables Completed"); }
public TaskCompletionSource <string> SyncIdentifier() { stringOutput = new TaskCompletionSource <string>(); ACPIdentity.SyncIdentifier("name", "john", ACPMobileVisitorAuthenticationState.Authenticated); stringOutput.SetResult("completed"); return(stringOutput); }
public void TestGetIdentifiers_Returns_SyncedIdentifiers() { // setup latch = new CountdownEvent(1); ACPIdentity.SyncIdentifier("id1", "value1", VisitorID.AuthenticationState.Authenticated); var ids = new Dictionary <string, string>(); ids.Add("id2", "value2"); ids.Add("id3", "value3"); ACPIdentity.SyncIdentifiers(ids); var ids2 = new Dictionary <string, string>(); ids2.Add("id4", "value4"); ids2.Add("id5", "value5"); ACPIdentity.SyncIdentifiers(ids2, VisitorID.AuthenticationState.LoggedOut); // test ACPIdentity.GetIdentifiers(new GetIdentifiersCallback()); latch.Wait(); latch.Dispose(); // verify Assert.That(retrievedVisitorIdentifiers, Is.StringContaining("[Id: value1, Type: id1, Origin: d_cid_ic, Authentication: AUTHENTICATED]")); Assert.That(retrievedVisitorIdentifiers, Is.StringContaining("[Id: value2, Type: id2, Origin: d_cid_ic, Authentication: UNKNOWN]")); Assert.That(retrievedVisitorIdentifiers, Is.StringContaining("[Id: value3, Type: id3, Origin: d_cid_ic, Authentication: UNKNOWN]")); Assert.That(retrievedVisitorIdentifiers, Is.StringContaining("[Id: value4, Type: id4, Origin: d_cid_ic, Authentication: LOGGED_OUT]")); Assert.That(retrievedVisitorIdentifiers, Is.StringContaining("[Id: value5, Type: id5, Origin: d_cid_ic, Authentication: LOGGED_OUT]")); }
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; // register SDK extensions ACPCore.Application = this.Application; ACPIdentity.RegisterExtension(); ACPLifecycle.RegisterExtension(); ACPSignal.RegisterExtension(); // start core ACPCore.Start(new CoreStartCompletionCallback()); // register dependency service to link interface from ACPCoreTestApp base project DependencyService.Register <IACPCoreExtensionService, ACPCoreExtensionService>(); }
// // 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 launch config ACPCore.ConfigureWithAppID("launch-ENf8ed5382efc84d5b81a9be8dcc231be1-development"); // set log level ACPCore.LogLevel = ACPMobileLogLevel.Verbose; // register SDK extensions ACPIdentity.RegisterExtension(); ACPLifecycle.RegisterExtension(); ACPSignal.RegisterExtension(); // start core ACPCore.Start(null); // register dependency service to link interface from ACPCoreTestApp base project DependencyService.Register <IACPCoreExtensionService, ACPCoreExtensionService>(); return(base.FinishedLaunching(app, options)); }
void Start() { if (Application.platform == RuntimePlatform.Android) { ACPCore.SetApplication(); } ACPCore.SetLogLevel(ACPCore.ACPMobileLogLevel.VERBOSE); ACPCore.SetWrapperType(); ACPIdentity.RegisterExtension(); ACPAnalytics.RegisterExtension(); ACPCore.Start(HandleStartAdobeCallback); var callbackResultsGameObject = GameObject.Find("CallbackResults"); callbackResultsText = callbackResultsGameObject.GetComponent <Text>(); btnExtensionVersion.onClick.AddListener(AnalyticsExtensionVersion); btnSendQueuedHits.onClick.AddListener(SendQueuedHits); btnClearQueue.onClick.AddListener(ClearQueue); btnGetQueueSize.onClick.AddListener(GetQueueSize); btnGetTrackingIdentifier.onClick.AddListener(GetTrackingIdentifier); btnGetVisitorIdentifier.onClick.AddListener(GetVisitorIdentifier); btnSetVisitorIdentifier.onClick.AddListener(SetVisitorIdentifier); btnBatchAnalyticsHits.onClick.AddListener(BatchAnalyticsHits); }
partial void AppendVisitorInfoForUrl(UIButton sender) { var callback = new Action <NSUrl>(handleCallback); var url = new NSUrl("https://example.com"); ACPIdentity.AppendToUrl(url, callback); Console.WriteLine("AppendVisitorInfoForUrl Completed"); }
public TaskCompletionSource <string> GetUrlVariables() { stringOutput = new TaskCompletionSource <string>(); var callback = new Action <NSString> (handleCallback); ACPIdentity.GetUrlVariables(callback); stringOutput.SetResult(""); return(stringOutput); }
void syncIdentifiers() { Dictionary <string, string> ids = new Dictionary <string, string>(); ids.Add("idsType1", "idValue1"); ids.Add("idsType2", "idValue2"); ids.Add("idsType3", "idValue3"); ACPIdentity.SyncIdentifiers(ids); }
public TaskCompletionSource <string> GetExperienceCloudId() { stringOutput = new TaskCompletionSource <string>(); var callback = new Action <NSString>(handleCallback); ACPIdentity.GetExperienceCloudId(callback); stringOutput.SetResult(""); return(stringOutput); }
public TaskCompletionSource <string> GetIdentifiers() { stringOutput = new TaskCompletionSource <string>(); var callback = new Action <ACPMobileVisitorId[]>(handleCallback); ACPIdentity.GetIdentifiers(callback); stringOutput.SetResult(""); return(stringOutput); }
public TaskCompletionSource <string> GetUrlVariables() { latch = new CountdownEvent(1); stringOutput = new TaskCompletionSource <string>(); ACPIdentity.GetUrlVariables(new StringCallback()); latch.Wait(1000); stringOutput.SetResult(callbackString); return(stringOutput); }
public TaskCompletionSource <string> AppendVisitorInfoForUrl() { latch = new CountdownEvent(1); stringOutput = new TaskCompletionSource <string>(); ACPIdentity.AppendVisitorInfoForURL("https://example.com", new StringCallback()); latch.Wait(1000); stringOutput.SetResult(callbackString); return(stringOutput); }
void syncIdentifiersWithAuthState() { Dictionary <string, string> ids = new Dictionary <string, string>(); ids.Add("idsType1", "idValue1"); ids.Add("idsType2", "idValue2"); ids.Add("idsType3", "idValue3"); ACPIdentity.SyncIdentifiers(ids, ACPIdentity.ACPAuthenticationState.AUTHENTICATED); }
public TaskCompletionSource <string> AppendVisitorInfoForUrl() { stringOutput = new TaskCompletionSource <string>(); var callback = new Action <NSUrl>(handleCallback); var url = new NSUrl("https://example.com"); ACPIdentity.AppendToUrl(url, callback); stringOutput.SetResult(""); return(stringOutput); }
// Core Methods void coreExtensionVersion() { string coreVersion = "coreVersion - " + ACPCore.ExtensionVersion() + " "; string identityVersion = "identityVersion - " + ACPIdentity.ExtensionVersion() + " "; string lifecycleVersion = "lifecycleVersion - " + ACPLifecycle.ExtensionVersion() + " "; string signalVersion = "signalVersion - " + ACPSignal.ExtensionVersion() + " "; _result = coreVersion + identityVersion + lifecycleVersion + signalVersion; print(_result); txtResult.text = _result; }
public TaskCompletionSource <string> SyncIdentifiersWithAuthState() { stringOutput = new TaskCompletionSource <string>(); var ids = new Dictionary <string, string>(); ids.Add("lastname", "doe"); ids.Add("age", "38"); ids.Add("zipcode", "94403"); ACPIdentity.SyncIdentifiers(ids, VisitorID.AuthenticationState.LoggedOut); stringOutput.SetResult("completed"); return(stringOutput); }
public TaskCompletionSource <string> SyncIdentifiers() { stringOutput = new TaskCompletionSource <string>(); var ids = new Dictionary <string, string>(); ids.Add("lastname", "doe"); ids.Add("age", "38"); ids.Add("zipcode", "94403"); ACPIdentity.SyncIdentifiers(ids); stringOutput.SetResult("completed"); return(stringOutput); }
partial void SyncIdentifiers(UIButton sender) { var ids = new NSMutableDictionary <NSString, NSObject> { ["lastName"] = new NSString("doe"), ["age"] = new NSString("38"), ["zipcode"] = new NSString("94403") }; ACPIdentity.SyncIdentifiers(ids); Console.WriteLine("SyncIdentifiers Completed"); }
partial void SyncIdentifiersWithAuthState(UIButton sender) { var ids = new NSMutableDictionary <NSString, NSObject> { ["lastName"] = new NSString("doe"), ["age"] = new NSString("38"), ["zipcode"] = new NSString("94403") }; ACPIdentity.SyncIdentifiers(ids, ACPMobileVisitorAuthenticationState.LoggedOut); Console.WriteLine("SyncIdentifiersWithAuthState Completed"); }
public TaskCompletionSource <string> SyncIdentifiersWithAuthState() { stringOutput = new TaskCompletionSource <string>(); var ids = new NSMutableDictionary <NSString, NSObject> { ["lastName"] = new NSString("doe"), ["age"] = new NSString("38"), ["zipcode"] = new NSString("94403") }; ACPIdentity.SyncIdentifiers(ids, ACPMobileVisitorAuthenticationState.LoggedOut); stringOutput.SetResult("completed"); return(stringOutput); }
public TaskCompletionSource <string> SyncIdentifiers() { stringOutput = new TaskCompletionSource <string>(); var ids = new NSMutableDictionary <NSString, NSObject> { ["lastName"] = new NSString("doe"), ["age"] = new NSString("38"), ["zipcode"] = new NSString("94403") }; ACPIdentity.SyncIdentifiers(ids); stringOutput.SetResult("completed"); return(stringOutput); }
public void TestGetUrlVariables_Returns_UrlVariables() { // setup latch = new CountdownEvent(2); string orgid = "972C898555E9F7BC7F000101%40AdobeOrg"; // test ACPIdentity.GetExperienceCloudId(new EcidCallback()); ACPIdentity.GetUrlVariables(new StringCallback()); latch.Wait(); latch.Dispose(); // verify Assert.That(retrievedString, Is.StringContaining(retrievedEcid)); Assert.That(retrievedString, Is.StringContaining(orgid)); }
public void TestAppendVisitorInfoForUrl_Returns_AppendedUrl() { // setup latch = new CountdownEvent(2); String url = "https://test.com"; String orgid = "972C898555E9F7BC7F000101%40AdobeOrg"; // test ACPIdentity.GetExperienceCloudId(new EcidCallback()); ACPIdentity.AppendVisitorInfoForURL(url, new StringCallback()); latch.Wait(1000); latch.Dispose(); // verify Assert.That(retrievedString, Is.StringContaining(url)); Assert.That(retrievedString, Is.StringContaining(retrievedEcid)); Assert.That(retrievedString, Is.StringContaining(orgid)); }
// Start is called before the first frame update void Start() { if (Application.platform == RuntimePlatform.Android) { ACPCore.SetApplication(); } ACPCore.SetLogLevel(ACPCore.ACPMobileLogLevel.VERBOSE); ACPCore.SetWrapperType(); ACPIdentity.RegisterExtension(); ACPLifecycle.RegisterExtension(); ACPSignal.RegisterExtension(); ACPCore.Start(HandleStartAdobeCallback); // Core btnCoreExtensionVersion.onClick.AddListener(coreExtensionVersion); btnSetApplication.onClick.AddListener(setApplication); btnGetApplication.onClick.AddListener(getApplication); btnSetLogLevel.onClick.AddListener(setLogLevel); btnGetLogLevel.onClick.AddListener(getLogLevel); btnDispatchEvent.onClick.AddListener(dispatchEvent); btnDispatchEventWithResponseCallback.onClick.AddListener(dispatchEventWithResponseCallback); btnDispatchResponseEvent.onClick.AddListener(dispatchResponseEvent); btnSetPrivacyStatus.onClick.AddListener(setPrivacyStatus); btnSetAdvertisingIdentifier.onClick.AddListener(setAdvertisingIdentifier); btnGetSdkIdentities.onClick.AddListener(getSdkIdentities); btnGetPrivacyStatus.onClick.AddListener(getPrivacyStatus); btnDownloadRules.onClick.AddListener(downloadRules); btnUpdateConfiguration.onClick.AddListener(updateConfiguration); btnTrackState.onClick.AddListener(trackState); btnTrackAction.onClick.AddListener(trackAction); // Identity btnIdentityExtensionVersion.onClick.AddListener(identityExtensionVersion); btnAppendToUrl.onClick.AddListener(appendToUrl); btnGetIdentifiers.onClick.AddListener(getIdentifiers); btnGetExperienceCloudId.onClick.AddListener(getExperienceCloudId); btnSyncIdentifier.onClick.AddListener(syncIdentifier); btnSyncIdentifiers.onClick.AddListener(syncIdentifiers); btnSyncIdentifiersWithAuthState.onClick.AddListener(syncIdentifiersWithAuthState); btnUrlVariables.onClick.AddListener(urlVariables); }
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 // 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); return(true); }