MySQL Installation for Mac: Community Server and Workbench
This article is written not to forget how to install MySQL to mac laptop and connect to IntelliJ Idea. I know that in future i will forget how to do it and not to google again wrote it as an instructions for myself. If it helped you, i would be…
Jetpack Compose: Listview and RecyclerView analogs
onCreate function: Copy these functions outside of MainActivity class e.g. after 12th row ListView analog: RecyclerView analog: RecyclerView analog with clickable items: PS. code taken from this course
Plan: 1. Create app with RoomDatabase. Git branch 2. Migrate from RecyclerView.Adapter to ListAdapter in Adapter. Git branch 3. Add Paging Library version 2. Git branch 4. Migrate to Paging Library version 3. Git branch 1. Create app with RoomDatabase Create Room Database according to Google’s recommended structure of app using Architecture Components.
Long-Running Services in Android
Bound Service Google documentation for more information In AndroidManifest.xml create service: Create MyService.kt class: In MainActivity.kt: The main point here, that while the activity is on focus, the service will continue working. The Logcat result will be:
Add workManager dependency, be sure to handle java 8 syntax and add Kotlin notation Deferrable tasks with WorkManager Create MyWorker.kt class: In MainActivity.kt create OneTimeWorkRequest and pass it to the enqueue(…) function of the WorkManager Instance git link Constraints In onCreate(…) function of MainActivity.kt create Constraints Builder and add it to OneTimeWorkRequest object: git link Data From Background to UI