FacebookActivity did not cause finish () on Api 23+

I am using facebook sdk in my application. In order not to show the solo indicator when the facebook button is pressed, I use:

<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 () before onResume () completed"

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

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

in problematic activities they solved the problem. But since I cannot edit FacebookActivity, is there an alternative solution?

+6
source share
3 answers

Facebook has changed its instructions for the initial setup of your project. Just change the theme for com.facebook.FacebookActivity for @android:style/Theme.Translucent.NoTitleBar .

+10
source

See javadoc windowNoDisplay :

(...) your activity should immediately exit, without waiting for user interaction (...)

So the exception is correct, your use case does not match windowNoDisplay .

0
source

This is a platform error.

If you use Theme.NoDisplay in one or several actions in your application, and you have not tested them on Android 6.0 yet, I recommend that you do so soon. An undocumented regression in Android 6.0 will cause some of these actions to crash on startup if targetSdkVersion is 23 or higher.

See this blog post: https://commonsware.com/blog/2015/11/02/psa-android-6p0-theme.nodisplay-regression.html

0
source

All Articles