AppsFlyer plugin for Phonegap.
Built against Phonegap 2.4.0.
- Add the appsflyer.js file to your www directory
-
Add the AppsFlyerPlugin.java file in the android directory and class path to your src directory.
-
Add the jar you received from AppsFlyer to your libs directory in your project
-
In the plugins section of your res/xml/config.xml file, add the following:
<plugin name="AppsFlyerPlugin" value="org.apache.cordova.appsflyer.AppsFlyerPlugin"/>
-
Drag the AppsFlyerPlugin.h and AppsFlyerPlugin.m files to your plugins directory.
-
From the Build Phases tab, expand Link Binary With Libraries, then click on the + button and add the lib_AppsFlyerLib.a file you recieved from AppsFlyer.
-
From the Build Settings tab, find the Other Linker Flags and add -lAppsFlyerLib
-
In the plugins section of your Resources/config.xml file, add the following:
<plugin name="AppsFlyerPlugin" value="AppsFlyerPlugin"/>
The only method supported is:
window.plugins.appsFlyer.notifyAppID(appId, devKey, eventName, eventValue);
-
appId: (String)(Required) App ID provided from AppsFlyer
-
devKey: (String)(Required) Dev key provided from AppsFlyer
-
eventName: (String)(Optional) The event name to define the event
-
eventValue: (String)(Optional) The event sales value