Description
firebase.analytics.init doesn't appear to call the supplied callback after initialisation.
I know that initialisation has been successful, because I see events in the Google Analytics DebugView.
This source code:
local function init_callback(self, ok, err)
print("in init_callback")
if ok then
print("ok")
end
if err then
print("err")
end
if not ok then
print("Firebase Analytics initialisation error")
print(err)
return
end
print("Firebase analytics initialised")
end
local function init_firebase(self)
print("About to check for firebase")
if not firebase then
print("firebase doesn't exist")
return
end
print("About to init firebase")
local ok, err = firebase.init()
if not ok then
print("Firebase initialisation error")
print(err)
return
end
print("About to init firebase analytics")
-- initialise analytics
firebase.analytics.init(init_callback)
print("init_firebase complete")
end
produces this output in logcat:
DEBUG:SCRIPT: About to check for firebase
DEBUG:SCRIPT: About to init firebase
DEBUG:SCRIPT: About to init firebase analytics
DEBUG:SCRIPT: init_firebase complete
Using: Defold 1.2.184 Extension-firebase 1.1.3 Extension-firebase-analytics 2.0.2
Platform: Android
Description firebase.analytics.init doesn't appear to call the supplied callback after initialisation. I know that initialisation has been successful, because I see events in the Google Analytics DebugView.
This source code:
produces this output in logcat: