我已經與TabGroupActivity(See this for example)的Android應用程序,一切工作正常,除了社交網絡整合Facebook和Twitter等。社會融合不是在Android應用程序正與TabGroupActivity
java.lang.RuntimeException: Unable to resume activity {com.xxxx.xxxxx/com.facebook.LoginActivity}: com.facebook.FacebookException: Cannot call LoginActivity with a null calling package. This can occur if the launchMode of the caller is singleInstance.
07-29 18:22:55.757: E/AndroidRuntime(2342): Caused by: com.facebook.FacebookException: Cannot call LoginActivity with a null calling package. This can occur if the launchMode of the caller is singleInstance.
PS:清單文件我更新的代碼如下:一切都實現TabGroupActivity
更新1之前工作得很好as:
<activity
android:name="com.facebook.LoginActivity"
android:label="@string/com_facebook_loginview_log_in_button"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:launchMode="singleTask" />
但異常仍然給:the launchMode of the caller is singleInstance
爲什麼這麼..?
UPDATE 2:現在我在Facebook SDK的LoginActivity裏面保留了調試點。在對於getCallingPackage(),我得到空
String callingPackage = getCallingPackage();//Always Null
BackTracing it: On the Calling Activity (FacebookShare.java), I always get data as null instead of some values.
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);
//Toast.makeText(FacebookShareActivity.this, "onActivityResult", Toast.LENGTH_SHORT).show();
}
任何人都可以解釋這種現象..?我一直在堅持這一點。
你在做什麼?我的意思是你想做只在社交網站上分享? –
@ JellyBean-是的..我有一些信息,我想與Facebook分享(意味着更新我的狀態)。並且在實現TabGroupActivity之前一切都很好。所以wat可能是解決方案嗎? –