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>(); }
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); }
// // 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)); }
public void Setup() { ACPCore.SetPrivacyStatus(ACPMobilePrivacyStatus.OptIn); }
private void startCallback() { // set launch config ACPCore.ConfigureWithAppID("94f571f308d5/e30a9514788b/launch-44fec1a705f1-development"); }
void getSdkIdentities() { print("Calling getSdkIdentities"); ACPCore.GetSdkIdentities(HandleGetIdentitiesAdobeCallback); }
// 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); }
public static void HandleStartAdobeCallback() { ACPCore.ConfigureWithAppID("launch-ENc28aaf2fb6934cff830c8d3ddc5465b1-development"); }
void downloadRules() { print("Calling downloadRules"); ACPCore.DownloadRules(); }
partial void SetAdvertisingIdentifier(UIButton sender) { ACPCore.SetAdvertisingIdentifier("testAdvertisingIdentifier"); Console.WriteLine("SetAdvertisingIdentifier Completed"); }
partial void DownloadRules(UIButton sender) { ACPCore.DownloadRules(); Console.WriteLine("DownloadRules Completed"); }
//ACPCore partial void GetExtensionVersionCore(UIButton sender) { string extensionVersion = ACPCore.ExtensionVersion(); Console.WriteLine("GetExtensionVersionCore: " + extensionVersion); }
partial void SetPrivacyStatus(UIButton sender) { ACPCore.SetPrivacyStatus(ACPMobilePrivacyStatus.OptIn); Console.WriteLine("SetPrivacyStatus Completed"); }
private void startCallback() { // set launch config ACPCore.ConfigureWithAppID("launch-ENf8ed5382efc84d5b81a9be8dcc231be1-development"); }
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(); }
public void TrackEvent(string eventName) { ACPCore.TrackAction(eventName, null); }
void getPrivacyStatus() { print("Calling getPrivacyStatus"); ACPCore.GetPrivacyStatus(HandleAdobePrivacyStatusCallback); }
protected override void OnResume() { base.OnResume(); ACPCore.LifecycleStart(null); }
public void TrackEvent(string eventName, Dictionary <string, string> data) { var dictData = data.ToNativeDictionary(); ACPCore.TrackAction(eventName, dictData); }
// ACPCore methods public TaskCompletionSource <string> GetExtensionVersionCore() { stringOutput = new TaskCompletionSource <string>(); stringOutput.SetResult(ACPCore.ExtensionVersion()); return(stringOutput); }
public void TrackState(string screenName, Dictionary <string, string> additionalContextData) { var dictData = additionalContextData?.ToNativeDictionary(); ACPCore.TrackState(screenName, dictData); }
public void Call(Java.Lang.Object callback) { // set launch config ACPCore.ConfigureWithAppID("launch-ENf8ed5382efc84d5b81a9be8dcc231be1-development"); }
public static void HandleStartAdobeCallback() { print(LOG_TAG + "HandleStartAdobeCallback"); ACPCore.ConfigureWithAppID("94f571f308d5/00fc543a60e1/launch-c861fab912f7-development"); }
// 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(); }
void setAdvertisingIdentifier() { print("Calling setAdvertisingIdentifier"); ACPCore.SetAdvertisingIdentifier("AdId"); }