Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Facebook Analytics
Started by Scott Harrison Dec 23 2016 11:29 PM

25 replies to this topic
[TOPIC CONTROLS]
Page 2 of 2 1 2
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

Scott Harrison

[GLOBAL: userInfoPane.html]
Scott Harrison
  • Corona Geek

  • 1,822 posts
  • Enterprise


Hi Scott

FacebookAnalytics broke on Android after Corona updated the Facebook SDK recently.

When I build (2019.3552) for android my app crashes when calling facebookAnalytics.init().
Same code used to build fine and I did no changes.

Here is the stack trace:

analytics.lua:122: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object referenceJava Stack Trace:
com.facebook.FacebookSdk.publishInstallAsync(FacebookSdk.java:619)
com.facebook.appevents.AppEventsLoggerImpl.activateApp(AppEventsLoggerImpl.java:113)
com.facebook.appevents.AppEventsLogger.activateApp(AppEventsLogger.java:200)
com.facebook.appevents.AppEventsLogger.activateApp(AppEventsLogger.java:209)
plugin.facebookAnalytics.LuaLoader$init.invoke(LuaLoader.java:168)
com.ansca.corona.JavaToNativeShim.nativeRender(Native Method)
com.ansca.corona.JavaToNativeShim.render(JavaToNativeShim.java:220)
com.ansca.corona.Controller.updateRuntimeState(Controller.java:382)
com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:450)
com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1625)
com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1380) - 
stack traceback:
[C]: in function 'init'
/Users/qp/Workspace/components/network/analytics.lua:122: in function 'init'
/Users/qp/Workspace/main.lua:157: in main chunk

This been fixed please use facebookAnalytics.init(facebookAppID)


[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]