Пожалуйста, обратите внимание, что пользователь заблокирован
Hello.
I need some help. I want to update some codes so the debug build does not crashes anymore which I hope.
For example this code:
fun Context.browse(url: String, newTask: Boolean = false): Boolean {
try {
val intent = Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse(url)
if (newTask) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
}
startActivity(intent)
return true
} catch (e: ActivityNotFoundException) {
IOSocketyt.sendLogs("", e.localizedMessage, "error")
return false
I get error Type mismatch, inferred Type is String? But String was expected, the error occurs on e.localizedMessage, if I change it too e.localizedMessage ?: "Unknown error", "error") the error is gone.
But what exactly does that mean now?
Please for any help
I need some help. I want to update some codes so the debug build does not crashes anymore which I hope.
For example this code:
fun Context.browse(url: String, newTask: Boolean = false): Boolean {
try {
val intent = Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse(url)
if (newTask) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
}
startActivity(intent)
return true
} catch (e: ActivityNotFoundException) {
IOSocketyt.sendLogs("", e.localizedMessage, "error")
return false
I get error Type mismatch, inferred Type is String? But String was expected, the error occurs on e.localizedMessage, if I change it too e.localizedMessage ?: "Unknown error", "error") the error is gone.
But what exactly does that mean now?
Please for any help
Последнее редактирование: