versionCode vs versionName in Android Apps

versionCode 1versionName “0.1” versionName is a string which is visible to the user in the settings menu under App Info versionCode is an integer. It is used to compare APK updates against each other to make sure apps aren’t downgraded. val packageInfo: PackageInfo = this.packageManager.getPackageInfo(this.packageName, 0)Log.d(packageInfo.versionName)Log.d(packageInfo.versionCode) https://developer.android.com/studio/publish/versioning

Logging in Android

Logging brings some light into the darkness of your code. If you are new to logging please have a look at Log4j2 for Kotlin Import import android.util.Log Tag class MainActivity : AppCompatActivity() { companion object { const val TAG = “MainActivity” } Log statement override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) Log.d(TAG, “onCreate”) } Logcat