RemoteFragment
使用RemoteFragment方式,在onActivityResult回调时报错
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
NLog.i(TAG, "FacebookLoginFragment.onActivityResult");
super.onActivityResult(requestCode, resultCode, data);
mCallbancManager.onActivityResult(requestCode, resultCode, data);
}
Class not found when unmarshalling: com.facebook.login.LoginClient$Result
java.lang.ClassNotFoundException: com.facebook.login.LoginClient$Result
Caused by: java.lang.ClassNotFoundException: Can't find class com.facebook.login.LoginClient$Result in BundleClassLoader: com.lianlianpay.europa_sign, dependencies=[], thread=Thread[main,5,main]
参考:https://developers.facebook.com/support/bugs/1621984714705591
参考:https://developers.facebook.com/support/bugs/1721610004736672
大概原因是com.lianlianpay.europa_sign插件在回调onActivityResult时没有Facebook的依赖,因此找不到com.facebook.login.LoginClient$Result
startActivity
AppBundleHelper.bundleExplicitly(mActivity, "facebook", "me.yezhou.lib", new AtlasBundleLoadedListener() {
@Override
public void onBundleLoaded() {
AtlasDelegateHelper.startBundleActivityForResult(mActivity, ActivityConfig.ACTIVITY_SOCIAL_FACEBOOK_LOGIN, IntentCode.REQUEST_FACEBOOK_LOGIN.ordinal());
mActivity.overridePendingTransition(R.anim.push_bottom_in, R.anim.push_bottom_out);
}
});
注意设置FacebookLoginActivity的背景为透明,让用户看不出有页面跳转的痕迹
<style name="Transparent" parent="AppTheme">
<item name="android:windowBackground">@color/transparent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsTranslucent">true</item>
</style>




