https://kotlinlang.org logo
#android
Title
# android
q

qohatpp

03/07/2024, 10:04 PM
Hi everyone. I would like to share with you this small single activity Kotlin Android app demo I'm working on. https://gist.github.com/qohat/b107574e1a3f3662566a4d6a03896002 I'm very new in android and I don't feel confident that I'm following best practices. If someone have a chance to take a look specifically to these two pieces of code I feel I need to improve. 1. https://gist.github.com/qohat/b107574e1a3f3662566a4d6a03896002#file-settingsactivity-kt-L45 a. I start and stop a ktor server based on a switch button b. I open a port of an embedded printer (The device) 2. https://gist.github.com/qohat/b107574e1a3f3662566a4d6a03896002#file-printerservice-kt a. I start/stop the server and printer in background to make it available until the user uncheck the switch button I would appreciate all your feedback to make necessary improvements in this project and feel more confident.
not kotlin but kotlin colored 1