Use SDKBOX with Custom Activity in Unity
if you have to create your own custom activity for your unity project, to add your java code or fix SDKBox Unity plugin lanucher activity conflict issue. please follow this steps:
- delete
CustomActivity.jar
(maybe location atAssets/SDKBOX/sdkbox/Resources/CustomActivity.jar
orAssets/Plugin/Android/libs/CustomActivity.jar
) - make sure
sdkbox.jar
is at this locationAssets/SDKBOX/sdkbox/Assets/Plugins/Android/sdkbox.jar
- modify your custom activity, maybe like follow:
import com.sdkbox.plugin.SDKBox;
public class UserMainActivity extends UnityPlayerActivity
{
//code
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
SDKBox.onActivityResult(requestCode, resultCode, data);
super.onActivityResult(requestCode, resultCode, data);
//code
}
//code
}