android get app version code code example
Example 1: android get app version programmatically
val versionName = requireContext().packageManager.getPackageInfo(requireContext().packageName, 0).versionName
Example 2: get app version android
String versionName = context.getPackageManager()
.getPackageInfo(context.getPackageName(), 0).versionName;