Allow integration with Flurry Analytics in your mobile apps developed using Apache Cordova.
It is available for Android and iOS.
- Apache Cordova >= 3.0
- Platforms: Android & iOS
- Flurry Analytics SDK (Android: 3.3.0 / iOS: 4.3.2)
To install the plugin, use the Cordova CLI and enter the following:
cordova plugin add https://github.com/Initsogar/cordova-flurry
###- Specific instructions for Android
Add the following code in your main activity.
@Override
protected void onStart()
{
super.onStart();
FlurryAgent.onStartSession(this, "YOUR_API_KEY");
}
@Override
protected void onStop()
{
super.onStop();
FlurryAgent.onEndSession(this);
}
You'll need to import FlurryAgent class using:
import com.flurry.android.FlurryAgent;
###- Specific instructions for iOS Add the following code inside your didFinishLaunchingWithOptions method in your AppDelegate.m
[Flurry startSession:@"YOUR_API_KEY"];
Remember to replace YOUR_API_KEY with your own key.
To log an event use:
window.plugins.flurry.logEvent('EVENT_NAME');