Difference between revisions of "Flurry"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
Line 7: Line 7:
 
This table stores all the functions related to Flurry analytics library.
 
This table stores all the functions related to Flurry analytics library.
  
Flurry is available only for iOS as an external plugin. To use flurry:
+
Flurry is available only for iOS and Android as an external plugin. To use flurry:
# Create an account on [https://www.flurry.com](https://www.flurry.com) and follow the instructions about creating a new application
+
# create an account on https://www.flurry.com and follow the instructions about creating a new application
# Download Flurry header and libraries and add them to your Xcode project
+
 
# Add {Gideros Installation Directory}/All Plugins/Flurry/source/iOS/flurry.mm file to your Xcode project
+
For iOS:
 +
# download Flurry header and libraries and add them to your Xcode project
 +
# add {Gideros Installation Directory}/All Plugins/Flurry/source/iOS/flurry.mm file to your Xcode project
  
 
To load the Flurry library:
 
To load the Flurry library:
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
require "flurry"
 
require "flurry"
 +
</syntaxhighlight>
 +
 +
=== Example ===
 +
<syntaxhighlight lang="lua">
 +
if application:getDeviceInfo() == "Android" or application:getDeviceInfo() == "iOS" then
 +
local api_key = "your flurry app key" -- if empty the app will crash!
 +
if flurry ~= nil and flurry.isAvailable() then
 +
print("Flurry is available")
 +
flurry.startSession(api_key)
 +
flurry.logEvent("menu", { name="menu_enter", value=123, } )
 +
else
 +
print("Flurry is not available")
 +
end
 +
end
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 20:38, 7 December 2023

Supported platforms: Platform android.pngPlatform ios.png
Available since: Gideros 2011.6

Description

This table stores all the functions related to Flurry analytics library.

Flurry is available only for iOS and Android as an external plugin. To use flurry:

  1. create an account on https://www.flurry.com and follow the instructions about creating a new application

For iOS:

  1. download Flurry header and libraries and add them to your Xcode project
  2. add {Gideros Installation Directory}/All Plugins/Flurry/source/iOS/flurry.mm file to your Xcode project

To load the Flurry library:

require "flurry"

Example

if application:getDeviceInfo() == "Android" or application:getDeviceInfo() == "iOS" then
	local api_key = "your flurry app key" -- if empty the app will crash!
	if flurry ~= nil and flurry.isAvailable() then
		print("Flurry is available")
		flurry.startSession(api_key)
		flurry.logEvent("menu", { name="menu_enter", value=123, } )
	else
		print("Flurry is not available")
	end
end

Methods

flurry.endTimedEvent ends Flurry timed event
flurry.isAvailable returns true if Flurry is available
flurry.logEvent logs Flurry event
flurry.startSession starts the Flurry session with your API key

Events

Constants