Question

I am using both Facebook and Chartboost SDK for Unity on Android. Both works fine individually. But when they are built in the same project, the activity for facebook -"com.facebook.unity.FBUnityPlayerActivity" and the activity for chartboost- "com.chartboost.sdk.unity.CBUnityPlayerProxyActivity" conflicted, because they need the same place. I wonder what is the solution to make both plug-in work together ?

Was it helpful?

Solution

Our main activity is only for those who aren't using other plugins who also want the main activity.

In order for activities to play nice with each other, the better thing to do in your case is to create a class that extends CBUnityPlayerProxyActivity and add:

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
  super.onActivityResult(requestCode, resultCode, data);
  Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);
}

This will pass data to the Facebook SDK correctly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top