This application was created with Android Studio to turn your smartphone's flashlight on and off. This project was used to create the Plugin to be used in Unity to access native Android functions and interact with the device's flashlight (see the Plugin-for-Unity repository for the creation of the Plugin and its use in Unity ).
Android Studio Giraffe | 2022.3.1 Patch 3
Open Android Studio and create a New Project by clicking on the appropriate button which will start the wizard.
In Phone and Table select Empty Activity and then on the Next button.
Edit the Name, Package Name, Save Location, Minimum SDK fields to your preferences. In Build configuration language choose Kotlin DSL [Recommended] and then click on the finish button.
Use the three files AndroidManifest.xml, MainActivity.kt and build.gradle.kts that you find in this repository, modifying the lines of code where indicated by the comments.
Build Apk and install it on your smartphone.