-
[Android] How to get Top Activity name of own AppAndroid 2020. 12. 1. 15:57반응형
private fun getTopActivityName(): String { val manager = getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager return manager.appTasks[0].taskInfo.topActivity!!.shortClassName.substring(1) }
반응형'Android' 카테고리의 다른 글
[Kotlin] HashMap (0) 2020.12.16 [Android] How to set spinner list item width to spinner width (0) 2020.12.02 [Android] 내부 테스트를 위한 내부 앱 공유 (0) 2020.11.13 [Kotlin] @JvmOverloads (0) 2020.11.06 [Kotlin] Scoping Functions apply vs. with, let, also, and run (0) 2020.11.04