I'm trying to do a Handler (). PostDelayed in kotlin using java as the base, however this time I get an error, could someone answer why this happens? And what would be the most up-to-date solution? And for what reason are there functions or classes that appear crossed out, as in this case Handler ()?:
Handler().postDelayed(Runnable {
            override fun run()
            {
                val sharedPreferences = getSharedPreferences("SharedPref", MODE_PRIVATE)
                var isFirstTime : Boolean = sharedPreferences.getBoolean("firstTime", true)
            }
        }, SPLASH_TIME_OUT.toLong())

 
     
    