Difference between revisions of "Flurry"
From GiderosMobile
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 and Android | + | Flurry is available only for iOS and Android. To use flurry: |
− | # create an account on 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 |
− | For iOS: | + | '''For iOS''' (external plugin): |
# download Flurry header and libraries and add them to your Xcode project | # 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 | # 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, add the Flurry '''plugin''' to your app and the following code: |
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
− | require "flurry" | + | if application:getDeviceInfo() == "Android" or application:getDeviceInfo() == "iOS" then |
+ | require "flurry" | ||
+ | end | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 26: | Line 28: | ||
print("Flurry is available") | print("Flurry is available") | ||
flurry.startSession(api_key) | flurry.startSession(api_key) | ||
− | flurry.logEvent(" | + | flurry.logEvent("test_event", { name="test" } ) |
else | else | ||
print("Flurry is not available") | print("Flurry is not available") |
Revision as of 21:09, 7 December 2023
Supported platforms:
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. To use flurry:
- create an account on https://www.flurry.com/ and follow the instructions about creating a new application
For iOS (external plugin):
- 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, add the Flurry plugin to your app and the following code:
if application:getDeviceInfo() == "Android" or application:getDeviceInfo() == "iOS" then
require "flurry"
end
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("test_event", { name="test" } )
else
print("Flurry is not available")
end
end
Methodsflurry.endTimedEvent ends Flurry timed event |
EventsConstants |