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.
For example, you can track
- geographic location of your users
- age and gender
- user ID
- page views
Tracking and Reporting Data¶
To track and report this data, you use the following Java methods:
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.|
Was this document helpful?