This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "FlurryUnityPlugin.h" | |
| ..... | |
| //in UnityAppController.mm | |
| - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions | |
| { | |
| ::printf("-> applicationDidFinishLaunching()\n"); | |
| FlurryUnityPlugin* sharedInstance = [FlurryUnityPlugin shared]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new Flurry.Builder() | |
| .WithCrashReporting(true) | |
| .WithIncludeBackgroundSessionsInMetrics(true) | |
| .WithContinueSessionMillis(6000) | |
| .WithLogEnabled(true) | |
| .WithLogLevel(Flurry.LogLevel.LogVERBOSE) | |
| //add this method to the Builder to enable push | |
| .WithMessaging(true) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Methods to initialize Flurry | |
| Flurry.Builder.withAppVersion(versionName = '1.0'); // iOS only. For Android, please use Flurry.setVersionName() instead. | |
| Flurry.Builder.withContinueSessionMillis(sessionMillis = 10000); | |
| Flurry.Builder.withCrashReporting(crashReporting = true); | |
| Flurry.Builder.withDataSaleOptOut(isOptOut = false); | |
| Flurry.Builder.withIAPReportingEnabled(enableIAP = true); // iOS only. | |
| Flurry.Builder.withIncludeBackgroundSessionsInMetrics(includeBackgroundSessionsInMetrics = true); | |
| Flurry.Builder.withLogEnabled(enableLog = true); | |
| Flurry.Builder.withLogLevel(logLevel = Flurry.LogLevel.WARN); // LogLevel = { VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT } | |
| Flurry.Builder.withPerformanceMetrics(performanceMetrics = Flurry.PerformanceMetrics.ALL)); // performanceMetrics = { NONE, COLD_START, SCREEN_TIME, ALL } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Flurry from 'react-native-flurry-sdk'; | |
| // Init Flurry once as early as possible recommended in index.js. | |
| // For each platfrom (Android, iOS) where the app runs you need to acquire a unique Flurry API Key. | |
| // i.e., you need two API keys if you are going to release the app on both Android and iOS platforms. | |
| // If you are building for TV platforms, you will need two API keys for Android TV and tvOS. | |
| new Flurry.Builder() | |
| .withCrashReporting(true) | |
| .withLogEnabled(true) | |
| .withLogLevel(Flurry.LogLevel.DEBUG) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void SetIAPReportingEnabled(bool enableIAP); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Flurry.EventRecordStatus LogEvent(string eventId); | |
| Flurry.EventRecordStatus LogEvent(string eventId, bool timed); | |
| Flurry.EventRecordStatus LogEvent(string eventId, Dictionary<string, string> parameters); | |
| Flurry.EventRecordStatus LogEvent(string eventId, Dictionary<string, string> parameters, bool timed); | |
| void EndTimedEvent(string eventId); | |
| void EndTimedEvent(string eventId, Dictionary<string, string> parameters); | |
| void OnPageView(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int GetAgentVersion(); | |
| //Android only | |
| string GetReleaseVersion(); | |
| string GetSessionId(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void SetAge(int age); | |
| void SetGender(Flurry.Gender gender); | |
| void SetReportLocation(bool reportLocation); | |
| void SetSessionOrigin(string originName, string deepLink); | |
| void SetUserId(string userId); | |
| //The SetVersionName method is called before the session is initialized. See the FlurryStart.cs example script for usage. | |
| void SetVersionName(string versionName); | |
| void AddOrigin(string originName, string originVersion); | |
| void AddOrigin(string originName, string originVersion, Dictionary<string, string> originParameters); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Build(string apiKey); | |
| Flurry.Builder WithCrashReporting(bool crashReporting); | |
| Flurry.Builder WithContinueSessionMillis(long sessionMillis); | |
| Flurry.Builder WithIncludeBackgroundSessionsInMetrics(bool includeBackgroundSessionsInMetrics); | |
| Flurry.Builder WithLogEnabled(bool enableLog); | |
| Flurry.Builder WithLogLevel(FlurrySDK.Flurry.LogLevel logLevel); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using FlurrySDK; | |
| public class FlurryStart : MonoBehaviour | |
| { | |
| #if UNITY_ANDROID | |
| private string FLURRY_API_KEY = "ANDROID_API_KEY"; | |
| #elif UNITY_IPHONE | |
| private string FLURRY_API_KEY = "IOS_API_KEY"; | |
| #else |