npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-acpcore-fork

v1.0.5

Published

Adobe Experience Platform - Core plugin for Cordova apps.(fork from https://github.com/adobe/cordova-acpcore)

Downloads

15

Readme

Adobe Experience Platform - Core plugin for Cordova apps

CI npm GitHub

Fork changes:

  • add implementations to gradle
  • update readme (installation)

Prerequisites

Cordova is distributed via npm (Node Package Management). In order to install and build Cordova applications you will need to have Node.js installed. Install Node.js. Once Node.js is installed, you can install the Cordova framework from terminal:

sudo npm install -g cordova

Installation

To start using the AEP SDK for Cordova, navigate to the directory of your Cordova app and install the plugin:

cordova plugin add cordova-acpcore-fork

Check out the documentation for help with APIs

Usage

Core

Initialization

iOS:

// Import the SDK
#import "ACPCore.h"
#import "ACPLifecycle.h"
#import "ACPIdentity.h"
#import "ACPSignal.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  
  // make sure to set the wrapper type at the beginning of initialization
  [ACPCore setWrapperType:ACPMobileWrapperTypeCordova];

  //...
  [ACPCore configureWithAppId:@"yourAppId"];
  [ACPIdentity registerExtension];
  [ACPLifecycle registerExtension];
  [ACPSignal registerExtension];
  // Register any additional extensions

  [ACPCore start:nil];
}

Android:

// Import the SDK
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Identity;
import com.adobe.marketing.mobile.Lifecycle;
import com.adobe.marketing.mobile.Signal;
import com.adobe.marketing.mobile.WrapperType;

@Override
public void onCreate() {
  //...
  MobileCore.setApplication(this);
  MobileCore.configureWithAppID("yourAppId");

  // make sure to set the wrapper type at the beginning of initialization
  MobileCore.setWrapperType(WrapperType.CORDOVA);

  try {
    Identity.registerExtension();
    Lifecycle.registerExtension();
    Signal.registerExtension();

    // Register any additional extensions
  } catch (Exception e) {
    // handle exception
  }

  MobileCore.start(null);
}

Core methods

Getting Core version:
ACPCore.extensionVersion(function(version) {
    console.log(version);
}, function(error) {
    console.log(error);
});
Updating the SDK configuration:
ACPCore.updateConfiguration({"newConfigKey":"newConfigValue"}, successCallback, errorCallback);
Controlling the log level of the SDK:
ACPCore.setLogLevel(ACPCore.ACPMobileLogLevelError, successCallback, errorCallback);
ACPCore.setLogLevel(ACPCore.ACPMobileLogLevelWarning, successCallback, errorCallback);
ACPCore.setLogLevel(ACPCore.ACPMobileLogLevelDebug, successCallback, errorCallback);
ACPCore.setLogLevel(ACPCore.ACPMobileLogLevelVerbose, successCallback, errorCallback);
Getting the current privacy status:
ACPCore.getPrivacyStatus(function(privacyStatus) {
    console.log(privacyStatus);
}, function(error) {
    console.log(error);
});
Setting the privacy status:
ACPCore.setPrivacyStatus(ACPCore.ACPMobilePrivacyStatusOptIn, successCallback, errorCallback);
ACPCore.setPrivacyStatus(ACPCore.ACPMobilePrivacyStatusOptOut, successCallback, errorCallback);
ACPCore.setPrivacyStatus(ACPCore.ACPMobilePrivacyStatusUnknown, successCallback, errorCallback);
Getting the SDK identities:
ACPCore.getSdkIdentities(function(sdkIdentities) {
    console.log(sdkIdentities);
}, function(error) {
    console.log(error);
});
Dispatching an Event Hub event:
var e = ACPCore.createEvent("eventName", "eventType", "eventSource", {"key":"value"});
ACPCore.dispatchEvent(e, successCallback, errorCallback);
Dispatching an Event Hub event with callback:
var e = ACPCore.createEvent("eventName", "eventType", "eventSource", {"key":"value"});
ACPCore.dispatchEventWithResponseCallback(e, successCallback, errorCallback);
Dispatching an Event Hub response event:
var e1 = ACPCore.createEvent("eventName", "eventType", "eventSource", {"key":"value"});
var e2 = ACPCore.createEvent("eventName2", "eventType", "eventSource", {"key":"value"});
ACPCore.dispatchResponseEvent(e1, e2, successCallback, errorCallback);
Downloading the Rules
ACPCore.downloadRules(successCallback, errorCallback);
Setting the advertising identifier:
ACPCore.setAdvertisingIdentifier("someAdid", successCallback, errorCallback);
Calling track action
ACPCore.trackAction("cordovaAction", {"cordovaKey":"cordovaValue"}, successCallback, errorCallback);
Calling track state
ACPCore.trackState("cordovaState", {"cordovaKey":"cordovaValue"}, successCallback, errorCallback);

Identity

Getting Identity version:
ACPIdentity.extensionVersion(function(version) {
    console.log(version);
}, function(error) {
    console.log(error);
});
Sync Identifier:
ACPIdentity.syncIdentifier("id1", "value1", ACPIdentity.ACPMobileVisitorAuthenticationStateUnknown, successCallback, errorCallback);
Sync Identifiers:
ACPIdentity.syncIdentifiers({"id2":"value2", "id3":"value3", "id4":"value4"}, successCallback, errorCallback);
Sync Identifiers with Authentication State:
ACPIdentity.syncIdentifiers({"id2":"value2", "id3":"value3", "id4":"value4"}, ACPIdentity.ACPMobileVisitorAuthenticationStateLoggedOut, successCallback, errorCallback);
ACPIdentity.syncIdentifiers({"id2":"value2", "id3":"value3", "id4":"value4"}, ACPIdentity.ACPMobileVisitorAuthenticationStateAuthenticated, successCallback, errorCallback);
ACPIdentity.syncIdentifiers({"id2":"value2", "id3":"value3", "id4":"value4"}, ACPIdentity.ACPMobileVisitorAuthenticationStateUnknown, successCallback, errorCallback);
Append visitor data to a URL:
ACPIdentity.appendVisitorInfoForUrl("https://www.adobe.com", successCallback, errorCallback);
Get visitor data as URL query parameter string:
ACPIdentity.getUrlVariables(function(variables) {
    console.log(variables);
}, function(error) {
    console.log(error);
});
Get Identifiers:
ACPIdentity.getIdentifiers(function(ids) {
    console.log(ids);
}, function(error) {
    console.log(error);
});
Get Experience Cloud IDs:
ACPIdentity.getExperienceCloudId(function(cloudId) {
    console.log(cloudId);
}, function(error) {
    console.log(error);
});

Lifecycle

Note: We recommend implementing Lifecycle in native Android and iOS code.

Getting Lifecycle version:
ACPLifecycle.extensionVersion(function(version) {
    console.log(version);
}, function(error) {
    console.log(error);
});

Signal

Getting Signal version:
ACPSignal.extensionVersion(function(version) {
    console.log(version);
}, function(error) {
    console.log(error);
});

Running Tests

Install cordova-paramedic https://github.com/apache/cordova-paramedic

npm install -g cordova-paramedic

Run the tests

cordova-paramedic --platform ios --plugin . --verbose
cordova-paramedic --platform android --plugin . --verbose

Sample App

A Cordova app for testing the Adobe SDK plugins is located at https://github.com/adobe/cordova-acpsample. The app is configured for both iOS and Android platforms.

Additional Cordova Plugins

Below is a list of additional Cordova plugins from the AEP SDK suite:

| Extension | GitHub | npm | |-----------|--------|-----| | Adobe Analytics | https://github.com/adobe/cordova-acpanalytics | npm | Places | https://github.com/adobe/cordova-acpplaces | npm | Project Griffon (Beta) | https://github.com/adobe/cordova-acpgriffon | npm

Contributing

Looking to contribute to this project? Please review our Contributing guidelines prior to opening a pull request.

We look forward to working with you!

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.