가용 Intent확인 Kotlin

fun isIntentAvailable(context: Context, action: String): Boolean {
val intent = Intent(action)
val list = context.packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY)
return list.size > 0
}

덧글

댓글 입력 영역