1

I am facing a black screen at the startup of the application sometimes.

Here is the code of splash, where I think I am not using any main thread blocking code if yes then it should block after 1.2 sec lol.

public class Splash extends BaseActivity
{
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);

        findViewById(R.id.ivLogo).postDelayed(new Runnable() {
            @Override
            public void run() {
                App app = (App) getApplication();
                app.initializeSingletons();

                startActivity(new Intent(Splash.this,NewHome.class));
                finish();
            }
        },1200);
    }
}

BaseActivity code look like this,

public class BaseActivity extends WearableActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    }
}

The problem, when I click on the app from the app list of wear it was showing black screen for 1 sec or 2 sec sometimes. Anyone facing this issue?

Watch Details :

Watch: Fossil Sports OS: Wear Os By Google 2.10 System Version: H MR1

compiled and targetSdkVersion version is 29

Ashvin solanki
  • 4,802
  • 3
  • 25
  • 65

0 Answers0