![]() |
VOOZH | about |
When we are implementing an AlertDialog within the android application for asking for permissions within the android application. In that case, we provide 2 options either to grant permissions or close the application. In this article, we will take a look at How to quit an android application programmatically using Jetpack Compose.
To create a new project in the Android Studio, please refer to How to Create a new Project in Android Studio with Jetpack Compose.
Go to the MainActivity.kt file and refer to the following code. Below is the code for the MainActivity.kt file. Comments are added inside the code to understand the code in more detail.
MainActivity.kt: