Alert dialog before a new thread
I have the code.
After clicking on the button, an alertdialog of the download warning should appear. And request a json file from the server.
    btnEnter = findViewById(R.id.btn_enter)
    btnEnter.setOnClickListener {
        val gson = Gson().toJson(authorization)
        val message = gson.toByteArray(StandardCharsets.UTF_8)
        val url = URL("my URL")
        val responseServer: String?
        val progressBar = AlertDialog.Builder(this)
        progressBar.setCancelable(false)...