This file contains 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 com.flurry.android.FlurryAgent; | |
public class MyApplication extends Application { | |
public void onCreate() { | |
super.onCreate(); | |
new FlurryAgent.Builder() | |
.withLogLevel(Log.VERBOSE) | |
.withLogEnabled(true) | |
.build(this, FLURRY_APIKEY); |
This file contains 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
// In your main app's Gradle config file: | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
// Recommended to add Google Play Services | |
implementation 'com.google.android.gms:play-services-ads-identifier:17.1.0' | |
This file contains 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
// Capture the author info & user status | |
let articleParams = ["Author": "John Q", "User_Status": "Registered"]; | |
Flurry.log(eventName: "Article_Read", parameters: articleParams, timed: true) | |
// In a function that captures when a user navigates away from article | |
// You can pass in additional params or update existing ones here as well | |
Flurry.endTimedEvent(eventName: "Article_Read", parameters: nil) |
This file contains 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
// Capture author info & user status | |
val articleParams = HashMap<String, String>() | |
articleParams["Author"] = "John Q" | |
articleParams["User_Status"] = "Registered" | |
FlurryAgent.logEvent("Article_Read", articleParams) |
This file contains 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.set(userId:"user_id") | |
Flurry.set(gender:"f") | |
Flurry.set(age:20) |
This file contains 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
let array = ["value1", "value2", "value3"] | |
//Sets and replaces (if any exist) the values for a property. | |
FlurryUserProperties.set("key", values: array) | |
FlurryUserProperties.set("key", value: "string") | |
//Adds the values or single value to the property. | |
FlurryUserProperties.add("key", values: array) | |
FlurryUserProperties.add("key", value: "string") |
This file contains 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
func someFunction(){ | |
let param = FlurryParamBuilder() | |
.set(doubleVal: 34.99, param: FlurryParamBuilder.totalAmount()) | |
.set(booleanVal: true, param: FlurryParamBuilder.success()) | |
.set(stringVal: "book 1", param: FlurryParamBuilder.itemName()) | |
.set(stringVal: "This is an awesome book to purchase !!!", key: "note") | |
Flurry.log(standardEvent: FlurryEvent.FLURRY_EVENT_PURCHASED, param: param) | |
} |
This file contains 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
// Capture the author info & user status | |
let articleParams = ["Author": "John Q", "User_Status": "Registered"]; | |
Flurry.log(eventName: "Article_Read", parameters: articleParams) |
This file contains 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.log(eventName: "article_read") |
This file contains 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 in Flurry.builder to initialize Flurry Agent | |
Builder withAppVersion(String versionName); // iOS only. For Android, please use Flurry.setVersionName() instead. | |
Builder withContinueSessionMillis(int sessionMillis); | |
Builder withCrashReporting(bool crashReporting); | |
Builder withDataSaleOptOut(bool isOptOut); | |
Builder withIncludeBackgroundSessionsInMetrics(bool includeBackgroundSessionsInMetrics); | |
Builder withLogEnabled(bool enableLog); | |
Builder withLogLevel(LogLevel logLevel); // LogLevel = { verbose, debug, info, warn, error, assertion } | |
Builder withMessaging(bool enableMessaging, MessagingListener listener); | |
Builder withPerformanceMetrics(int performanceMetrics); // Performance = { none, coldStart, screenTime, all } |
NewerOlder