val downloadManager = getSystemService(DOWNLOAD_SERVICE) as DownloadManager
val request = DownloadManager.Request(Uri.parse("https://xxx.xx"))
val filename = "update" + System.currentTimeMillis()
val dir: String = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).toString() + "/"
val file = File("$dir$filename.apk")
request.setTitle("dm-test")
request.setDescription("downing...")
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)
request.setMimeType("application/vnd.android.package-archive")
request.setDestinationUri(Uri.fromFile(file))
downloadManager.enqueue(request)
this code working in android api<33 is no problem, in android api=33 Notification no working