Advanced Features for Flurry Analytics with Android¶
Flurry offers a number of advanced features for Android developers that enable you to gain even greater insight into your users.
Track geographic location¶
If your app has location permissions, such as
Flurry will track where your app is being used and report this back to you at the city level. Without this level of detail, Flurry will use the IP address of the user’s device and report this information at the country level.
To disable detailed location reporting even when your app has permission, call
Flurry uses cached value (to avoid excessive battery usage) when location reporting is enabled. You may call
to set the location manually if your app uses the GPS. Call this method to set the current location (used with geographical targeting). This should be called before init, if possible; otherwise call it as soon as the location is available.
Track user ID and demographics¶
Use this to log the user’s assigned ID or username in your system. This should be called before init, if possible.
Warning: It is a violation of our terms of service to track personally identifiable information such as a device ID (e.g. Android ID) using this method. If you have a user login that you wish to send to Flurry using this method, you must anonymize the data using a hashing function such as MD5 or SHA256 prior to calling this method.
Use this to log the user’s age. Valid inputs are between 1 and 109. This should be called before init, if possible.
Use this to log the user’s gender. Valid inputs are Constants.MALE or Constants.FEMALE. This should be called before init, if possible.
onError to report errors that your app catches. Flurry will report the first 10 errors to occur in each session.
onError to report app errors. Flurry will report the
first 10 errors to occur in each session.
The FlurryAgent will also notify you of uncaught exceptions.
Used to allow/disallow Flurry SDK to report uncaught exceptions. The feature is enabled by default, and if you would like to disable this behavior, this must be called before calling init.
Track page views¶
Use this Java method:
onPageView to report page view count. To increment the total
count, you should call this method whenever a new page is shown to the user.
This Page View method is different from Custom Events. If you are interested in tracking specific in-app actions (e.g. “Viewed Main Menu Screen”), you can do so using Events as discussed in Custom Events.
The following are additional features provided in the Flurry SDK.
||Returns a string containing current Flurry SDK release version.|
||Sets the version name of the app. This name will appear in the http://dev.flurry.com as a filtering option by version. This should be called before init.|
||Gets the version of the Flurry SDK.|
||Use setLogEnabled to enable/disable internal Flurry SDK logging. This should be called before init.|
||Sets the log level of the internal Flurry SDK logging. Valid inputs are Log.VERBOSE, Log.WARN etc. Default log level is Log.WARN. This should be called before init.|
||Use setLogEvents to enable/disable the event logging. This should be called before init.|
FlurryAgent.isSessionActive()”,”Returns true if Flurry session is active and false otherwise.”
FlurryAgent.getSessionId()”,”Returns true if Flurry session is active and false otherwise.”
FlurryAgent.addOriginString originName, String originVersion, Map”,”Use addOrigin to if you are wrapping Flurry SDK within another SDK or plugin to mark the origin attribution. The event is identified by the originName, originVersion and originParameters. OriginParameters can be passed in as a Map
Was this document helpful?