Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FacebookActivity did not call finish() on Api 23+

I am using facebook sdk in my app. In order not to show the solo progress bar when facebook button is clicked, I am using:

<activity android:name="com.facebook.FacebookActivity"
            android:configChanges=
                "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:theme="@android:style/Theme.NoDisplay"
</activity>

However, I think for devices with api 23+ this causes a crash:

"com.facebook.FacebookActivity did not call finish() prior to onResume() completing"

Someone said here:Activity did not call finish? (API 23) by writing:

@Override
protected void onStart() {
    super.onStart();
    setVisible(true);
}

in the problematic activity, they solved the issue. But since I cannot edit FacebookActivity, is there any alternative solution?

like image 427
Can Gokdere Avatar asked Oct 17 '15 10:10

Can Gokdere


1 Answers

Facebook have changed their instructions for initially setting up your project. Just change the theme for the com.facebook.FacebookActivity to @android:style/Theme.Translucent.NoTitleBar.

like image 83
Newtz Avatar answered Oct 20 '22 06:10

Newtz