Use react-native-splash-screen to manage splash in detached expo

Due to many bugs found in expo splash screen (mine is flash of white screen during splash screen loading ) i decided to detach from expo and use another package to manage it.

So i came across react-native-splash-screen package.

According to the RNSC documentation, i should add this code in MainActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
  SplashScreen.show(this);  // here
  super.onCreate(savedInstanceState);
}

This code should be added to MainActivity when the MainActivity extends ReactActivity

But expo detached MainActivity, extends DetachedActivity and i can not override onCreate method there.

How to fix it?

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.