We finally fixed this problem by catching the exception and avoiding device activation without the facebook application installed. The facebook developer answered us:
"The user must install the Facebook Android application on his device and log in to activate the activApp function."
This is the code we finally used, and it no longer crashes:
try{ if (com.facebook.Settings.getAttributionId(getContentResolver()) != null){ com.facebook.AppEventsLogger.activateApp(this); } } catch (IllegalStateException e){ Log.d(TAG, "Facebook Setting Exception again!"); }
I hope this helps others ...
source share