flurry setup on android app

Dear All, 

Is it normal to put this three line in every scenes?

I’m using director class and if I doesn’t put this three line on every lua file then it will come up error like this.


xyz.lua:7: attempt to index global ‘analytics’ (a nil value)


Three line to init flurry:

local analytics = require( “analytics” )

local application_key = “1234567890ABCDEFG”

analytics.init( application_key )

Thanks in advance.

KC

You’d want to initialize flurry in main.lua with the three lines of code.  But then, I don’t think you need to initialize it in every single scene.  Have you tried adding only this line to each scene you need analytics:  local analytics = require( “analytics” )

Naomi

Thanks

You’d want to initialize flurry in main.lua with the three lines of code.  But then, I don’t think you need to initialize it in every single scene.  Have you tried adding only this line to each scene you need analytics:  local analytics = require( “analytics” )

Naomi

Thanks