instruction
stringlengths
113
251
input
stringlengths
98
353
output
stringlengths
135
454k
text
stringlengths
443
454k
Implement the native Android class `SplineEntity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/funnypaper/simme/data/local/entity/SplineEntity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.funnypaper.simme.data.local.entity import androidx.room.ColumnInfo import androidx.room.Entity import androidx.room.ForeignKey import androidx.room.Index import androidx.room.PrimaryKey import com.funnypaper.simme.domain.model.SplineModel @Entity( tableName = "spline", foreignKeys = [ ...
<|turn>user Implement the native Android class `SplineEntity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/funnypaper/simme/data/local/entity/SplineEntity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose...
Implement the Android ViewModel `ResetPasswordViewModelTest` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state.
Repository path: app/src/test/java/com/openwallet/ui/activity/fragment/resetpassword/model/ResetPasswordViewModelTest.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.openwallet.ui.activity.fragment.resetpassword.model import androidx.arch.core.executor.testing.InstantTaskExecutorRule import androidx.lifecycle.MutableLiveData import com.google.gson.JsonObject import com.openwallet.app.AppViewModel import com.openwallet.app.OpenWalletApplication import com.open...
<|turn>user Implement the Android ViewModel `ResetPasswordViewModelTest` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state. Context: Repository path: app/src/test/java/com/openwallet/ui/activity/fragment/resetpas...
Implement the Android ViewModel `PlaylistViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state.
Repository path: app/src/main/java/com/jaiselrahman/wastatus/ui/playlist/PlaylistViewModel.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.jaiselrahman.wastatus.ui.videos import androidx.lifecycle.LiveData import androidx.lifecycle.Transformations import androidx.lifecycle.ViewModel import androidx.paging.LivePagedListBuilder import androidx.paging.PagedList import com.jaiselrahman.wastatus.data.PlaylistDataSource import com.jaiselr...
<|turn>user Implement the Android ViewModel `PlaylistViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state. Context: Repository path: app/src/main/java/com/jaiselrahman/wastatus/ui/playlist/PlaylistViewMod...
Implement the native Android class `TagGroupTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app-compose/src/androidTest/java/com/example/android/trackr/compose/ui/TagGroupTest.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
<|turn>user Implement the native Android class `TagGroupTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app-compose/src/androidTest/java/com/example/android/trackr/compose/ui/TagGroupTest.kt Language: Kotlin Framework: AndroidX / J...
Implement the native Android class `ProfileScreen` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: admin/app/src/main/java/com/yazan98/groupyadmin/screens/ProfileScreen.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.yazan98.groupyadmin.screens import android.content.Intent import android.os.Bundle import android.view.View import androidx.appcompat.app.AppCompatActivity import com.google.firebase.auth.FirebaseAuth import com.yazan98.groupyadmin.R import com.yazan98.groupyadmin.logic.ProfileRepository import c...
<|turn>user Implement the native Android class `ProfileScreen` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: admin/app/src/main/java/com/yazan98/groupyadmin/screens/ProfileScreen.kt Language: Kotlin Framework: AndroidX / Jetpack Compos...
Implement the native Android class `that` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: cgps-core/src/main/java/com/genius/cgps/HardwareCGPS.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin @file:Suppress("UNUSED") package com.genius.cgps import android.Manifest import android.content.Context import android.location.* import android.os.Build import android.os.Bundle import androidx.annotation.IntRange import androidx.core.content.ContextCompat import kotlinx.coroutines.* import kotlinx.corouti...
<|turn>user Implement the native Android class `that` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: cgps-core/src/main/java/com/genius/cgps/HardwareCGPS.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn...
Provide the native Android implementation for `VEIAnchorableInternal.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: editor/src/main/java/good/damn/editor/anchors/internal/VEIAnchorableInternal.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package good.damn.editor.anchors.internal import android.graphics.Canvas import android.graphics.PointF interface VEIAnchorableInternal { fun draw( canvas: Canvas ) fun checkAnchor( from: PointF, to: PointF, touch: PointF ): PointF? } ```
<|turn>user Provide the native Android implementation for `VEIAnchorableInternal.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: editor/src/main/java/good/damn/editor/anchors/internal/VEIAnchorableInternal.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Cor...
Provide the native Android implementation for `AppInit.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: sample/src/main/java/xyz/louiscad/splittiessample/AppInit.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright (c) 2017. <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
<|turn>user Provide the native Android implementation for `AppInit.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: sample/src/main/java/xyz/louiscad/splittiessample/AppInit.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|> <|turn>model ```ko...
Implement the native Android class `UnsupportedViewMapper` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: features/dd-sdk-android-session-replay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/mapper/UnsupportedViewMapper.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2016-Present Datadog, Inc. */ package com.datadog.android.sessionreplay.internal.recorder...
<|turn>user Implement the native Android class `UnsupportedViewMapper` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: features/dd-sdk-android-session-replay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/mapper/Unsu...
Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `App`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration.
Repository path: sd-client-app/src/jvmMain/kotlin/de/lostmekka/sdwuic/Main.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package de.lostmekka.sdwuic import androidx.compose.desktop.ui.tooling.preview.Preview import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.material.Button import androidx.compose.material.Checkbox import androidx.compose.material.CircularProg...
<|turn>user Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `App`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration. Context: Repository path: sd-client-app/src/jvmMain/kotlin/de/lostmekka/sdwuic/Main.kt Language: Kotlin Framework: AndroidX / ...
Implement the native Android class `SessionService` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/io/chaldeaprjkt/gamespace/gamebar/SessionService.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright (C) 2021 Chaldeaprjkt * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
<|turn>user Implement the native Android class `SessionService` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/io/chaldeaprjkt/gamespace/gamebar/SessionService.kt Language: Kotlin Framework: AndroidX / Jetpack Compose ...
Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/org/y20k/transistor/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * MainActivity.kt * Implements the MainActivity class * MainActivity is the default activity that can host the player fragment and the settings fragment * * This file is part of * TRANSISTOR - Radio App for Android * * Copyright (c) 2015-21 - Y20K.org * Licensed under the MIT-License * http://ope...
<|turn>user Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/org/y20k/transistor/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutine...
Implement the native Android class `GetDamageProductListRegRepository` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/breezebengaldetergentproducts/features/damageProduct/api/GetDamageProductListRegRepository.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.breezebengaldetergentproducts.features.damageProduct.api import android.content.Context import android.net.Uri import android.text.TextUtils import android.util.Log import com.breezebengaldetergentproducts.app.FileUtils import com.breezebengaldetergentproducts.base.BaseResponse import com.breezeb...
<|turn>user Implement the native Android class `GetDamageProductListRegRepository` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/breezebengaldetergentproducts/features/damageProduct/api/GetDamageProductListRegRepo...
Implement the native Android class `InputInLayerTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/input/InputInLayerTest.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
<|turn>user Implement the native Android class `InputInLayerTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/input/InputInLayerTest.kt Language: Kotlin Framework: ...
Implement the native Android class `BreedObservable` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/info/juanmendez/breedgallery/ui/breedlist/viewmodel/BreedObservable.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package info.juanmendez.breedgallery.ui.breedlist.viewmodel import android.databinding.BaseObservable import android.databinding.Bindable import info.juanmendez.breedgallery.BR import info.juanmendez.breedgallery.models.Breed /** * Created by <NAME> on 2/15/18. * * This is an observable used for recycler...
<|turn>user Implement the native Android class `BreedObservable` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/info/juanmendez/breedgallery/ui/breedlist/viewmodel/BreedObservable.kt Language: Kotlin Framework: Android...
Implement the native Android class `StoryActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/net/xaethos/trackernotifier/StoryActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package net.xaethos.trackernotifier import android.content.Context import android.content.Intent import android.os.Bundle import android.support.design.widget.CollapsingToolbarLayout import android.support.design.widget.TabLayout import android.support.v4.app.FragmentPagerAdapter import android.support.v4.vi...
<|turn>user Implement the native Android class `StoryActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/net/xaethos/trackernotifier/StoryActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin...
Configure modern type-safe Navigation Compose routes and destination mappings in Kotlin for `Navigation` using Kotlinx Serialization.
Repository path: navigation-material/src/main/java/com/google/accompanist/navigation/material/SheetContentHost.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
<|turn>user Configure modern type-safe Navigation Compose routes and destination mappings in Kotlin for `Navigation` using Kotlinx Serialization. Context: Repository path: navigation-material/src/main/java/com/google/accompanist/navigation/material/SheetContentHost.kt Language: Kotlin Framework: AndroidX / Jetpack Com...
Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `CategoryFormStateless`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration.
Repository path: app/src/main/java/com/mateuszcholyn/wallet/frontend/view/screen/categoryScreen/CategoryFormStateless.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.mateuszcholyn.wallet.frontend.view.screen.categoryScreen import android.annotation.SuppressLint import androidx.annotation.StringRes import androidx.compose.foundation.layout.Column import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import and...
<|turn>user Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `CategoryFormStateless`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration. Context: Repository path: app/src/main/java/com/mateuszcholyn/wallet/frontend/view/screen/categoryScreen/Cat...
Provide the native Android implementation for `MenuInterface.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: app/src/main/java/com/jacktor/batterylab/interfaces/views/MenuInterface.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.jacktor.batterylab.interfaces.views import android.content.ClipData import android.content.ClipboardManager import android.content.Context import android.content.Intent import android.os.Build import android.view.LayoutInflater import android.widget.Toast import androidx.appcompat.content.res.Ap...
<|turn>user Provide the native Android implementation for `MenuInterface.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: app/src/main/java/com/jacktor/batterylab/interfaces/views/MenuInterface.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|...
Implement the native Android class `SettingsFragment` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: sample/src/main/java/net/mm2d/webclip/SettingsFragment.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright (c) 2019 大前良介 (OHMAE Ryosuke) * * This software is released under the MIT License. * http://opensource.org/licenses/MIT */ package net.mm2d.webclip import android.content.Intent import android.net.Uri import android.os.Bundle import androidx.preference.PreferenceFragmentCompat import net...
<|turn>user Implement the native Android class `SettingsFragment` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: sample/src/main/java/net/mm2d/webclip/SettingsFragment.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin C...
Provide the native Android implementation for `FileReader.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: app/src/test/java/FileReader.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.learning.mygenai import androidx.appcompat.widget.ThemedSpinnerAdapter.Helper import java.io.InputStreamReader object FileReader { fun readFile(file:String):String { val inputStream=Helper::class.java.getResourceAsStream(file) val builder=StringBuilder() val inputStr...
<|turn>user Provide the native Android implementation for `FileReader.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: app/src/test/java/FileReader.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|> <|turn>model ```kotlin package com.learning....
Implement the native Android class `Blockv` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: core/src/main/java/io/blockv/core/client/Blockv.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * BlockV AG. Copyright (c) 2018, all rights reserved. * * Licensed under the BlockV SDK License (the "License"); you may not use this file or the BlockV SDK except in * compliance with the License accompanying it. Unless required by applicable law or agreed to in writing, the BlockV * SDK distribu...
<|turn>user Implement the native Android class `Blockv` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: core/src/main/java/io/blockv/core/client/Blockv.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|> ...
Provide the native Android implementation for `Requests.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: app/src/main/java/com/henrikherzig/playintegritychecker/attestation/Requests.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.henrikherzig.playintegritychecker.attestation import android.content.ContentValues import android.util.Log import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response import okhttp3.ResponseBody import org.json.JSONObject /** * sends generic api call and checks for errors in the ...
<|turn>user Provide the native Android implementation for `Requests.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: app/src/main/java/com/henrikherzig/playintegritychecker/attestation/Requests.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|...
Provide the native Android implementation for `NetworkModule.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: core/network/src/main/java/com/mburakcakir/network/di/NetworkModule.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.mburakcakir.network.di import android.content.Context import com.chuckerteam.chucker.api.ChuckerInterceptor import dagger.Module import dagger.Provides import dagger.hilt.InstallIn import dagger.hilt.android.qualifiers.ApplicationContext import dagger.hilt.components.SingletonComponent import okh...
<|turn>user Provide the native Android implementation for `NetworkModule.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: core/network/src/main/java/com/mburakcakir/network/di/NetworkModule.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|> <|...
Provide the native Android implementation for `ToolWindowUtils.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: plugins/package-search/src/com/jetbrains/packagesearch/intellij/plugin/ui/toolwindow/ToolWindowUtils.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.jetbrains.packagesearch.intellij.plugin.ui.toolwindow import com.intellij.openapi.actionSystem.ActionGroup import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.project.Project import com.intellij.openapi.wm.ToolWindow import com.intellij.openapi.wm.ex.ToolWindowEx import ...
<|turn>user Provide the native Android implementation for `ToolWindowUtils.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: plugins/package-search/src/com/jetbrains/packagesearch/intellij/plugin/ui/toolwindow/ToolWindowUtils.kt Language: Kotlin Framework: AndroidX / Jetpack Co...
Provide the native Android implementation for `DownloadUtils.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: app/src/main/java/tool/xfy9326/schedule/utils/DownloadUtils.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package tool.xfy9326.schedule.utils import android.app.DownloadManager import android.content.Context import android.net.Uri import android.os.Environment import androidx.core.content.getSystemService import androidx.core.net.toUri import io.github.xfy9326.atools.ui.openUrlInBrowser import tool.xfy9326.sched...
<|turn>user Provide the native Android implementation for `DownloadUtils.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: app/src/main/java/tool/xfy9326/schedule/utils/DownloadUtils.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|> <|turn>mod...
Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/abdallah_abdelazim/asteroidradar/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.abdallah_abdelazim.asteroidradar import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import androidx.navigation.findNavController import androidx.navigation.fragment.NavHostFragment import androidx.navigation.ui.AppBarConfiguration import androidx.navigation.ui.navigateUp imp...
<|turn>user Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/abdallah_abdelazim/asteroidradar/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose /...
Provide the native Android implementation for `WordCounterComponent.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: app/src/main/java/com/andria/wordcounter/di/wordcounter/WordCounterComponent.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.andria.wordcounter.di.wordcounter import android.app.Activity import com.andria.wordcounter.bookSelectionScreen.BookSelectionActivity import com.andria.wordcounter.wordCountScreen.WordCountActivity import dagger.Subcomponent import dagger.android.AndroidInjector @Subcomponent(modules = [WordCoun...
<|turn>user Provide the native Android implementation for `WordCounterComponent.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: app/src/main/java/com/andria/wordcounter/di/wordcounter/WordCounterComponent.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coro...
Implement the native Android class `StackCardExampleActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/github/satoshun/example/StackCardExampleActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.github.satoshun.example import android.os.Bundle import androidx.appcompat.app.AppCompatActivity class StackCardExampleActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.stack_card_act) } } ...
<|turn>user Implement the native Android class `StackCardExampleActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/github/satoshun/example/StackCardExampleActivity.kt Language: Kotlin Framework: AndroidX / Je...
Implement the native Android class `StackCardExampleActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/github/satoshun/example/StackCardExampleActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.github.satoshun.example import android.os.Bundle import androidx.appcompat.app.AppCompatActivity class StackCardExampleActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.stack_card_act) } } ...
<|turn>user Implement the native Android class `StackCardExampleActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/github/satoshun/example/StackCardExampleActivity.kt Language: Kotlin Framework: AndroidX / Je...
Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `SelectArtistCoverScreen`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration.
Repository path: app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/main/artist/artist_select_cover/SelectArtistCoverScreen.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.lighttigerxiv.simple.mp.compose.screens.main.artist.artist_select_cover import android.graphics.Bitmap import android.graphics.BitmapFactory import android.graphics.drawable.Drawable import android.util.Base64 import androidx.compose.foundation.Image import androidx.compose.foundation.background ...
<|turn>user Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `SelectArtistCoverScreen`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration. Context: Repository path: app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/main/artist/artist...
Implement the native Android class `BroadcastService` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/bluelock/realdownloader/util/BroadcastService.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.bluelock.realdownloader.util import android.app.DownloadManager import android.app.Service import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.content.IntentFilter import android.os.Environment import android.os.IBinder import andro...
<|turn>user Implement the native Android class `BroadcastService` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/bluelock/realdownloader/util/BroadcastService.kt Language: Kotlin Framework: AndroidX / Jetpack Compo...
Implement the native Android class `AuthenticationTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: syftlib/src/test/java/org/openmined/syft/integration/AuthenticationTest.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package org.openmined.syft.integration import android.net.NetworkCapabilities import com.nhaarman.mockitokotlin2.any import com.nhaarman.mockitokotlin2.argumentCaptor import com.nhaarman.mockitokotlin2.never import com.nhaarman.mockitokotlin2.spy import com.nhaarman.mockitokotlin2.verify import org.junit.Tes...
<|turn>user Implement the native Android class `AuthenticationTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: syftlib/src/test/java/org/openmined/syft/integration/AuthenticationTest.kt Language: Kotlin Framework: AndroidX / Jetpack...
Implement the native Android class `DataBindingAdaptersTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: Corona-Warn-App/src/test/java/de/rki/coronawarnapp/util/DataBindingAdaptersTest.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package de.rki.coronawarnapp.util import android.content.Context import android.content.res.Resources import android.graphics.drawable.Drawable import android.widget.Switch import com.airbnb.lottie.LottieAnimationView import com.airbnb.lottie.LottieDrawable import de.rki.coronawarnapp.R import de.rki.coronaw...
<|turn>user Implement the native Android class `DataBindingAdaptersTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: Corona-Warn-App/src/test/java/de/rki/coronawarnapp/util/DataBindingAdaptersTest.kt Language: Kotlin Framework: Andro...
Implement the native Android class `ReportFragment` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/opsc/timesync/ui/report/ReportFragment.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.opsc.timesync.ui.report import android.app.DatePickerDialog import android.os.Build import androidx.lifecycle.ViewModelProvider import android.os.Bundle import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.w...
<|turn>user Implement the native Android class `ReportFragment` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/opsc/timesync/ui/report/ReportFragment.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotl...
Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: kotlin/samples/tictactoe/app/src/main/java/com/squareup/sample/mainactivity/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2017 Square Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
<|turn>user Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: kotlin/samples/tictactoe/app/src/main/java/com/squareup/sample/mainactivity/MainActivity.kt Language: Kotlin Framework: Android...
Implement the native Android class `CrashReportingTree` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: baseKit/src/main/java/me/shetj/base/tools/app/Tim.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package me.shetj.base.tools.app import android.util.Log import timber.log.Timber import java.io.File object Tim { private val LOG_FILE_PATH = Utils.app.externalCacheDir?.path + File.separator + "baseLog.test" /** * 设置log自动在debug打开,在release关闭 * @param isDebug */ fun setLogAuto(is...
<|turn>user Implement the native Android class `CrashReportingTree` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: baseKit/src/main/java/me/shetj/base/tools/app/Tim.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coro...
Provide the native Android implementation for `PermissionUtil.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: camera/integration-tests/extensionstestapp/src/main/java/androidx/camera/integration/extensions/utils/PermissionUtil.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
<|turn>user Provide the native Android implementation for `PermissionUtil.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: camera/integration-tests/extensionstestapp/src/main/java/androidx/camera/integration/extensions/utils/PermissionUtil.kt Language: Kotlin Framework: Androi...
Implement the native Android class `ConnectivityStatusTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: noty-android/app/composeapp/src/androidTest/java/dev/shreyaspatil/noty/composeapp/component/ConnectivityStatusTest.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2020 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
<|turn>user Implement the native Android class `ConnectivityStatusTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: noty-android/app/composeapp/src/androidTest/java/dev/shreyaspatil/noty/composeapp/component/ConnectivityStatusTest.kt...
Implement the native Android class `ConnectivityStatusTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: noty-android/app/composeapp/src/androidTest/java/dev/shreyaspatil/noty/composeapp/component/ConnectivityStatusTest.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2020 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
<|turn>user Implement the native Android class `ConnectivityStatusTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: noty-android/app/composeapp/src/androidTest/java/dev/shreyaspatil/noty/composeapp/component/ConnectivityStatusTest.kt...
Implement the native Android class `GesturesTrackingStrategy` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: dd-sdk-android/src/main/kotlin/com/datadog/android/rum/internal/instrumentation/GesturesTrackingStrategy.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2016-Present Datadog, Inc. */ package com.datadog.android.rum.internal.instrumentation i...
<|turn>user Implement the native Android class `GesturesTrackingStrategy` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: dd-sdk-android/src/main/kotlin/com/datadog/android/rum/internal/instrumentation/GesturesTrackingStrategy.kt Languag...
Implement the native Android class `BackgroundScreenshotTests` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: core/designsystem/src/test/kotlin/com/merxury/blocker/core/designsystem/BackgroundScreenshotTests.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
<|turn>user Implement the native Android class `BackgroundScreenshotTests` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: core/designsystem/src/test/kotlin/com/merxury/blocker/core/designsystem/BackgroundScreenshotTests.kt Language: Kot...
Implement the Android ViewModel `QueueViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state.
Repository path: app/src/main/java/me/devsaki/hentoid/viewmodels/QueueViewModel.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package me.devsaki.hentoid.viewmodels import android.app.Application import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.LiveData import androidx.lifecycle.MediatorLiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.viewModelScope import androidx.work.ExistingWorkPol...
<|turn>user Implement the Android ViewModel `QueueViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state. Context: Repository path: app/src/main/java/me/devsaki/hentoid/viewmodels/QueueViewModel.kt Language...
Implement the Android ViewModel `MainViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state.
Repository path: app/src/main/java/xyz/teamgravity/swipetodeleteedit/MainViewModel.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package xyz.teamgravity.swipetodeleteedit import androidx.lifecycle.ViewModel import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.update class MainViewModel : ViewModel() { private val _names ...
<|turn>user Implement the Android ViewModel `MainViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state. Context: Repository path: app/src/main/java/xyz/teamgravity/swipetodeleteedit/MainViewModel.kt Langua...
Implement the native Android class `Adyen3DS2Component` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: 3ds2/src/main/java/com/adyen/checkout/adyen3ds2/Adyen3DS2Component.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright (c) 2019 <NAME>. * * This file is open source and available under the MIT license. See the LICENSE file for more info. * * Created by caiof on 7/5/2019. */ package com.adyen.checkout.adyen3ds2 import android.app.Activity import android.content.Intent import androidx.lifecycle.LifecycleOw...
<|turn>user Implement the native Android class `Adyen3DS2Component` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: 3ds2/src/main/java/com/adyen/checkout/adyen3ds2/Adyen3DS2Component.kt Language: Kotlin Framework: AndroidX / Jetpack Comp...
Implement the Android ViewModel `HiltLib041ViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state.
Repository path: libs/hiltLib041/src/main/java/hilt/benchmark/hiltLib041/HiltLib041ViewModel.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package hilt.benchmark.hiltLib041 import androidx.lifecycle.ViewModel import dagger.hilt.android.lifecycle.HiltViewModel import javax.inject.Inject @HiltViewModel class HiltLib041ViewModel @Inject constructor() : ViewModel() ```
<|turn>user Implement the Android ViewModel `HiltLib041ViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state. Context: Repository path: libs/hiltLib041/src/main/java/hilt/benchmark/hiltLib041/HiltLib041Vie...
Implement the native Android class `KotlinActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: sample/src/main/java/com/tyganeutronics/activator/KotlinActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.tyganeutronics.activator import android.os.Bundle import android.view.View import android.widget.AdapterView import android.widget.ArrayAdapter import android.widget.CompoundButton import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.AppCompatCheckBox import androidx.a...
<|turn>user Implement the native Android class `KotlinActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: sample/src/main/java/com/tyganeutronics/activator/KotlinActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / ...
Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `W3ISampleNavGraph`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration.
Repository path: sample/inbox/src/main/java/com/walletconnect/sample/web3inbox/ui/routes/W3ISampleNavGraph.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin @file:OptIn(ExperimentalMaterialNavigationApi::class) package com.walletconnect.sample.web3inbox.ui.routes import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.unit.dp import androidx....
<|turn>user Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `W3ISampleNavGraph`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration. Context: Repository path: sample/inbox/src/main/java/com/walletconnect/sample/web3inbox/ui/routes/W3ISampleNavGr...
Design a reactive Android Room DAO interface `CityDao` in Kotlin. Provide reactive Coroutine Flow queries, upsert capabilities, and transaction safety.
Repository path: app/src/main/java/com/example/androidweather/db/CityDao.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.example.androidweather.db import androidx.room.Dao import androidx.room.Insert import androidx.room.OnConflictStrategy import androidx.room.Query import io.reactivex.rxjava3.core.Single @Dao interface CityDao { @Query("SELECT * FROM city ORDER BY last_searched_at DESC LIMIT 1") fun getLastS...
<|turn>user Design a reactive Android Room DAO interface `CityDao` in Kotlin. Provide reactive Coroutine Flow queries, upsert capabilities, and transaction safety. Context: Repository path: app/src/main/java/com/example/androidweather/db/CityDao.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Corout...
Implement the native Android class `NotificationHelperImpl` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/marknkamau/justjava/utils/NotificationHelper.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.thuylinhtran.FoodKotlin.utils import android.app.NotificationChannel import android.app.NotificationManager import android.content.Context import android.os.Build import androidx.annotation.RequiresApi import androidx.core.app.NotificationCompat import androidx.core.content.ContextCompat import c...
<|turn>user Implement the native Android class `NotificationHelperImpl` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/marknkamau/justjava/utils/NotificationHelper.kt Language: Kotlin Framework: AndroidX / Jetpack ...
Implement the native Android class `VerificationConclusionFragment` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: vector/src/main/java/im/vector/riotx/features/crypto/verification/qrconfirmation/VerificationQrScannedByOtherFragment.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2019 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
<|turn>user Implement the native Android class `VerificationConclusionFragment` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: vector/src/main/java/im/vector/riotx/features/crypto/verification/qrconfirmation/VerificationQrScannedByOther...
Provide the native Android implementation for `ResourcesProvider.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: core/resources/src/main/java/com/sapiest/vaultspace/core/resources/ResourcesProvider.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.sapiest.vaultspace.core.resources import android.graphics.drawable.Drawable import androidx.annotation.ColorRes import androidx.annotation.DrawableRes import androidx.annotation.StringRes interface ResourcesProvider { fun getString(@StringRes resId: Int): String fun getColor(@ColorRes re...
<|turn>user Provide the native Android implementation for `ResourcesProvider.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: core/resources/src/main/java/com/sapiest/vaultspace/core/resources/ResourcesProvider.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin...
Provide the native Android implementation for `ResourcesProvider.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: core/resources/src/main/java/com/sapiest/vaultspace/core/resources/ResourcesProvider.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.sapiest.vaultspace.core.resources import android.graphics.drawable.Drawable import androidx.annotation.ColorRes import androidx.annotation.DrawableRes import androidx.annotation.StringRes interface ResourcesProvider { fun getString(@StringRes resId: Int): String fun getColor(@ColorRes re...
<|turn>user Provide the native Android implementation for `ResourcesProvider.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: core/resources/src/main/java/com/sapiest/vaultspace/core/resources/ResourcesProvider.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin...
Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/jp/gr/aqua/dropbox/provider/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package jp.gr.aqua.dropbox.provider import android.os.Bundle import android.provider.DocumentsContract import androidx.appcompat.app.AppCompatActivity import com.dropbox.core.android.Auth import jp.gr.aqua.dropbox.provider.databinding.ActivityMainBinding class MainActivity : AppCompatActivity() { priv...
<|turn>user Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/jp/gr/aqua/dropbox/provider/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin C...
Implement the native Android class `ToggleController` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: demo/src/main/java/otpview/demo/ToggleController.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package otpview.demo import android.widget.Checkable internal abstract class ToggleController(private val checkable: Checkable) { fun setActive(newActive: Boolean) { checkable.isChecked = newActive if (newActive) { onActive() } else { onInactive() } } abstract fun onActive...
<|turn>user Implement the native Android class `ToggleController` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: demo/src/main/java/otpview/demo/ToggleController.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Corouti...
Implement the native Android class `CountryListActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: demo-app/src/main/java/com/github/mrbean355/android/demo/CountryListActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.github.mrbean355.android.demo import android.os.Bundle import android.view.Menu import android.view.MenuItem import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.SearchView import androidx.recyclerview.widget.RecyclerView import com.github.m...
<|turn>user Implement the native Android class `CountryListActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: demo-app/src/main/java/com/github/mrbean355/android/demo/CountryListActivity.kt Language: Kotlin Framework: AndroidX / J...
Implement the native Android class `ItemEditDialog` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/dev/koffein/shoppingreminder/fragments/ItemEditDialog.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package dev.koffein.shoppingreminder.fragments import android.app.Dialog import android.os.Bundle import android.util.Log import android.view.LayoutInflater import android.view.View import androidx.core.os.bundleOf import androidx.fragment.app.activityViewModels import androidx.fragment.app.setFragmentResult...
<|turn>user Implement the native Android class `ItemEditDialog` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/dev/koffein/shoppingreminder/fragments/ItemEditDialog.kt Language: Kotlin Framework: AndroidX / Jetpack Com...
Provide the native Android implementation for `AndroidThreeTenDateTime.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: core/src/main/java/com/mksoftware101/core/datetime/AndroidThreeTenDateTime.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.mksoftware101.core.datetime import android.app.Application import com.jakewharton.threetenabp.AndroidThreeTen object AndroidThreeTenDateTime { fun initialize(context: Application) { AndroidThreeTen.init(context) } } ```
<|turn>user Provide the native Android implementation for `AndroidThreeTenDateTime.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: core/src/main/java/com/mksoftware101/core/datetime/AndroidThreeTenDateTime.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Cor...
Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `ShowDeviceBody`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration.
Repository path: app/src/main/java/com/santansarah/blescanner/presentation/scan/device/Device.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.santansarah.blescanner.presentation.scan.device import androidx.compose.foundation.border import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.MoreVert import ...
<|turn>user Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `ShowDeviceBody`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration. Context: Repository path: app/src/main/java/com/santansarah/blescanner/presentation/scan/device/Device.kt Language:...
Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/example/myfirstproject/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.example.myfirstproject import android.annotation.SuppressLint import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.Button import android.widget.EditText import android.widget.TextView import android.widget.Toast class MainAc...
<|turn>user Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/example/myfirstproject/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Co...
Design a reactive Android Room DAO interface `NewsDao` in Kotlin. Provide reactive Coroutine Flow queries, upsert capabilities, and transaction safety.
Repository path: app/src/main/java/io/bibuti/opennews/data/db/NewsDao.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package io.bibuti.opennews.data.db import androidx.paging.PagingSource import androidx.room.* /** * Defining the DAOs for performing DB operations */ @Dao interface NewsDao { @Insert(onConflict = OnConflictStrategy.REPLACE) suspend fun saveNews(news: List<SingleNewsItem>) @Query("select * fr...
<|turn>user Design a reactive Android Room DAO interface `NewsDao` in Kotlin. Provide reactive Coroutine Flow queries, upsert capabilities, and transaction safety. Context: Repository path: app/src/main/java/io/bibuti/opennews/data/db/NewsDao.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutine...
Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `LoginScreen`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration.
Repository path: app/src/main/java/com/example/jsonplaceholder/ui/login/LoginScreen.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.example.jsonplaceholder.ui.login import android.annotation.SuppressLint import android.app.Activity import android.widget.Toast import androidx.activity.compose.rememberLauncherForActivityResult import androidx.activity.result.contract.ActivityResultContracts import androidx.compose.foundation.Im...
<|turn>user Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `LoginScreen`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration. Context: Repository path: app/src/main/java/com/example/jsonplaceholder/ui/login/LoginScreen.kt Language: Kotlin Frame...
Implement the native Android class `OtherUserProfile` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: android/khajit/app/src/main/java/com/project/khajit_app/activity/ui/other_profile/OtherUserProfile.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.project.khajit_app.activity.ui.other_profile import android.graphics.Color import androidx.lifecycle.ViewModelProviders import android.os.Bundle import android.text.method.ScrollingMovementMethod import android.util.Log import android.view.KeyEvent import androidx.fragment.app.Fragment import and...
<|turn>user Implement the native Android class `OtherUserProfile` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: android/khajit/app/src/main/java/com/project/khajit_app/activity/ui/other_profile/OtherUserProfile.kt Language: Kotlin Fram...
Implement the native Android class `Miui3DFaceManagerImpl` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: biometric/src/main/java/dev/skomlach/biometric/compat/engine/internal/face/miui/impl/Miui3DFaceManagerImpl.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright (c) 2023 <NAME> aka Salat-Cx65; Original project https://github.com/Salat-Cx65/AdvancedBiometricPromptCompat * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obta...
<|turn>user Implement the native Android class `Miui3DFaceManagerImpl` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: biometric/src/main/java/dev/skomlach/biometric/compat/engine/internal/face/miui/impl/Miui3DFaceManagerImpl.kt Language...
Implement the native Android class `CPUView` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/quixom/apps/deviceinfo/views/CPUView.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.quixom.apps.deviceinfo.views import android.view.Gravity import android.widget.LinearLayout import com.quixom.apps.deviceinfo.fragments.CPUFragment import org.jetbrains.anko.* /** * Created by akif on 9/25/17. */ class CPUView : AnkoComponent<CPUFragment> { private lateinit var ankoContex...
<|turn>user Implement the native Android class `CPUView` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/quixom/apps/deviceinfo/views/CPUView.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Corout...
Implement the native Android class `TestContext` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/TestOwner.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
<|turn>user Implement the native Android class `TestContext` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/TestOwner.kt Language: Kotlin Framework: AndroidX / Jetpack Co...
Provide the native Android implementation for `KissWinkHeart.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: font-awesome/src/commonMain/kotlin/compose/icons/fontawesomeicons/solid/KissWinkHeart.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package compose.icons.fontawesomeicons.solid import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.PathFillType.NonZero import androidx.compose.ui.graphics.SolidColor import androidx.compose.ui.graphics.StrokeCap.Butt import androidx.compose.ui.graphics.StrokeJoin.Miter import android...
<|turn>user Provide the native Android implementation for `KissWinkHeart.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: font-awesome/src/commonMain/kotlin/compose/icons/fontawesomeicons/solid/KissWinkHeart.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Co...
Provide the native Android implementation for `KissWinkHeart.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: font-awesome/src/commonMain/kotlin/compose/icons/fontawesomeicons/solid/KissWinkHeart.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package compose.icons.fontawesomeicons.solid import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.PathFillType.NonZero import androidx.compose.ui.graphics.SolidColor import androidx.compose.ui.graphics.StrokeCap.Butt import androidx.compose.ui.graphics.StrokeJoin.Miter import android...
<|turn>user Provide the native Android implementation for `KissWinkHeart.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: font-awesome/src/commonMain/kotlin/compose/icons/fontawesomeicons/solid/KissWinkHeart.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Co...
Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `AppBars`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration.
Repository path: app/src/main/java/com/guru/composecookbook/ui/learnwidgets/AppBars.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.guru.composecookbook.ui.learnwidgets import androidx.compose.foundation.Image import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.* import androidx.compose.material.icons.Icons import androidx.compose.material.icons.fil...
<|turn>user Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `AppBars`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration. Context: Repository path: app/src/main/java/com/guru/composecookbook/ui/learnwidgets/AppBars.kt Language: Kotlin Framework...
Implement the native Android class `AppApplication` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: sample/src/main/kotlin/br/com/zup/beagle/sample/BeagleUiSampleApplication.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
<|turn>user Implement the native Android class `AppApplication` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: sample/src/main/kotlin/br/com/zup/beagle/sample/BeagleUiSampleApplication.kt Language: Kotlin Framework: AndroidX / Jetpack C...
Provide the native Android implementation for `LogUtils.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: mvvm/src/main/java/com/taonce/mvvm/util/LogUtils.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.moyoi.library_base.utils import android.util.Log /** * 常用的日志打印类 */ const val COMMON_TAG = "WanAndroid" private const val IS_SHOW_LOG: Boolean = true fun showDebug( msg: String, tag: String = COMMON_TAG ) { if (IS_SHOW_LOG) { Log.d(tag, zipLogMsg(msg)) } } fun showEr...
<|turn>user Provide the native Android implementation for `LogUtils.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: mvvm/src/main/java/com/taonce/mvvm/util/LogUtils.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|> <|turn>model ```kotlin pac...
Configure modern type-safe Navigation Compose routes and destination mappings in Kotlin for `NavFragmentA` using Kotlinx Serialization.
Repository path: examples/androidx-samples/src/main/java/org/koin/sample/sandbox/navigation/NavFragmentA.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package org.koin.sample.androidx.navigation import android.os.Bundle import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Button import androidx.navigation.fragment.findNavController import org.koin.androidx.navi...
<|turn>user Configure modern type-safe Navigation Compose routes and destination mappings in Kotlin for `NavFragmentA` using Kotlinx Serialization. Context: Repository path: examples/androidx-samples/src/main/java/org/koin/sample/sandbox/navigation/NavFragmentA.kt Language: Kotlin Framework: AndroidX / Jetpack Compose...
Implement the native Android class `FlipperVersionApiImpl` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: components/bridge/impl/src/main/java/com/flipperdevices/bridge/impl/manager/service/FlipperVersionApiImpl.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.flipperdevices.bridge.impl.manager.service import android.bluetooth.BluetoothGatt import android.bluetooth.BluetoothGattCharacteristic import androidx.datastore.core.DataStore import com.flipperdevices.bridge.api.manager.ktx.state.FlipperSupportedState import com.flipperdevices.bridge.api.manager...
<|turn>user Implement the native Android class `FlipperVersionApiImpl` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: components/bridge/impl/src/main/java/com/flipperdevices/bridge/impl/manager/service/FlipperVersionApiImpl.kt Language:...
Implement the native Android class `AdvancedScreenshotSampleTestLegacy` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/advanced/AdvancedScreenshotSampleTestLegacy.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.kaspersky.kaspressample.docloc_tests.advanced import android.graphics.Color import androidx.fragment.app.testing.launchFragmentInContainer import com.kaspersky.kaspressample.docloc.ScreenshotSampleFragment import com.kaspersky.kaspressample.docloc.ScreenshotSampleView import com.kaspersky.kaspres...
<|turn>user Implement the native Android class `AdvancedScreenshotSampleTestLegacy` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/advanced/Advance...
Implement the native Android class `TodoConverter` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/xyz/teamgravity/todo/data/local/converter/TodoConverter.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package xyz.teamgravity.todo.data.local.converter import androidx.room.TypeConverter import java.util.* class TodoConverter { @TypeConverter fun dateToLong(value: Date): Long { return value.time } @TypeConverter fun longToDate(value: Long): Date { return Date(value) ...
<|turn>user Implement the native Android class `TodoConverter` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/xyz/teamgravity/todo/data/local/converter/TodoConverter.kt Language: Kotlin Framework: AndroidX / Jetpack Co...
Implement the Android ViewModel `PlayersViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state.
Repository path: android/app/src/main/java/com/thedevgang/liga/presentation/ui/players/PlayersViewModel.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.thedevgang.liga.presentation.ui.players import androidx.lifecycle.ViewModel class PlayersViewModel : ViewModel() { // TODO: Implement the ViewModel } ```
<|turn>user Implement the Android ViewModel `PlayersViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state. Context: Repository path: android/app/src/main/java/com/thedevgang/liga/presentation/ui/players/Pl...
Implement the Android ViewModel `FeedBackFragmentViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state.
Repository path: vector/src/main/java/vmodev/clearkeep/viewmodels/FeedBackFragmentViewModel.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package vmodev.clearkeep.viewmodels import androidx.lifecycle.LiveData import vmodev.clearkeep.repositories.FeedbackRepository import vmodev.clearkeep.rests.models.responses.FeedbackResponse import vmodev.clearkeep.viewmodelobjects.Resource import vmodev.clearkeep.viewmodels.interfaces.AbstractFeedBackFragme...
<|turn>user Implement the Android ViewModel `FeedBackFragmentViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state. Context: Repository path: vector/src/main/java/vmodev/clearkeep/viewmodels/FeedBackFragme...
Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `AccountInfoBox`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration.
Repository path: feature/profile/src/main/java/com/niyaj/profile/components/AccountInfoBox.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2024 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
<|turn>user Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `AccountInfoBox`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration. Context: Repository path: feature/profile/src/main/java/com/niyaj/profile/components/AccountInfoBox.kt Language: Ko...
Implement the native Android class `MediaCatalog` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: videoplayerapp/src/main/java/com/example/android/videoplayersample/MediaCatalog.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2018 Google LLC. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
<|turn>user Implement the native Android class `MediaCatalog` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: videoplayerapp/src/main/java/com/example/android/videoplayersample/MediaCatalog.kt Language: Kotlin Framework: AndroidX / Jetpa...
Provide the native Android implementation for `Barcode.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: build/icons/compose/vitaminicons/fill/Barcode.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.decathlon.vitamin.compose.vitaminicons.fill import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.PathFillType.Companion.EvenOdd import androidx.compose.ui.graphics.SolidColor import androidx.compose.ui.graphics.StrokeCap.Companion.Butt import androidx.compose.ui.graphics....
<|turn>user Provide the native Android implementation for `Barcode.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: build/icons/compose/vitaminicons/fill/Barcode.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|> <|turn>model ```kotlin package...
Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/example/hotpopcorn/view/main/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.example.hotpopcorn.view.main import android.content.Intent import android.os.Bundle import android.view.Menu import android.view.MenuItem import android.view.View import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.SearchView import androidx.lifecycle.ViewModelProvide...
<|turn>user Implement the native Android class `MainActivity` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/example/hotpopcorn/view/main/MainActivity.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kot...
Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `upgradeMode`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration.
Repository path: Android/App_qixiashan/App/src/main/java/com/zktony/android/ui/upgradeMode.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.zktony.android.ui import android.content.Context import android.graphics.Color.rgb import android.os.Build import android.os.storage.StorageManager import android.util.Log import android.widget.Toast import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.ExperimentalFo...
<|turn>user Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `upgradeMode`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration. Context: Repository path: Android/App_qixiashan/App/src/main/java/com/zktony/android/ui/upgradeMode.kt Language: Kotli...
Provide the native Android implementation for `MockData.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: app/src/main/java/com/harshalv/jetpackcompose/model/MockData.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.harshalv.jetpackcompose.model import android.icu.text.SimpleDateFormat import android.util.Log import com.harshalv.jetpackcompose.R import java.util.Calendar import java.util.Date import java.util.Locale object MockData { val topNewsList = listOf<NewsData>( NewsData( 1, ...
<|turn>user Provide the native Android implementation for `MockData.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: app/src/main/java/com/harshalv/jetpackcompose/model/MockData.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|> <|turn>model `...
Implement the native Android class `Queue` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/example/mrakopediareader/api/Queue.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.example.mrakopediareader.api import android.content.Context import com.android.volley.Request import com.android.volley.RequestQueue import com.android.volley.RetryPolicy import com.android.volley.toolbox.JsonArrayRequest import com.android.volley.toolbox.JsonObjectRequest import com.android.voll...
<|turn>user Implement the native Android class `Queue` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/example/mrakopediareader/api/Queue.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines...
Implement the native Android class `GlideLoader` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: loader/src/main/java/com/pyamsoft/pydroid/loader/glide/GlideLoader.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin /* * Copyright 2020 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
<|turn>user Implement the native Android class `GlideLoader` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: loader/src/main/java/com/pyamsoft/pydroid/loader/glide/GlideLoader.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / K...
Implement the native Android class `BaseApplication` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/github/unborn2016/mykotlindemo/BaseApplication.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.github.unborn2016.mykotlindemo import android.annotation.SuppressLint import android.app.Application import android.content.Context /** * Created by Unborn on 2021/7/7. */ class BaseApplication : Application() { companion object { const val TOKEN = "123" @SuppressLint("St...
<|turn>user Implement the native Android class `BaseApplication` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/github/unborn2016/mykotlindemo/BaseApplication.kt Language: Kotlin Framework: AndroidX / Jetpack Compo...
Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `ButtonSpec`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration.
Repository path: legacy/core/src/commonMain/kotlin/atom/Buttons.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package opensavvy.decouple.core.atom import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import kotlinx.coroutines.CoroutineScope import opensavvy.decouple.core.UI import opensavvy....
<|turn>user Develop a high-performance native Android UI component in Kotlin using Jetpack Compose for `ButtonSpec`. Ensure state hoisting, recomposition efficiency, and clean Material 3 integration. Context: Repository path: legacy/core/src/commonMain/kotlin/atom/Buttons.kt Language: Kotlin Framework: AndroidX / Jetp...
Implement the native Android class `Latest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: data/src/main/java/com/hackertronix/model/countries/Latest.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.hackertronix.model.countries import androidx.room.Entity import androidx.room.PrimaryKey import com.squareup.moshi.Json import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) @Entity data class Latest( @PrimaryKey(autoGenerate = true) val id: Int = 0, @Json(name = "co...
<|turn>user Implement the native Android class `Latest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: data/src/main/java/com/hackertronix/model/countries/Latest.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Corouti...
Implement the Android ViewModel `DetailViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state.
Repository path: app/src/main/java/com/oguzdogdu/wallieshd/presentation/detail/DetailViewModel.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.oguzdogdu.wallieshd.presentation.detail import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.oguzdogdu.domain.model.favorites.FavoriteImages import com.oguzdogdu.domain.repository.DataStore import com.oguzdogdu.domain.usecase.auth.GetCheckUserAuthStateUseCase im...
<|turn>user Implement the Android ViewModel `DetailViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state. Context: Repository path: app/src/main/java/com/oguzdogdu/wallieshd/presentation/detail/DetailViewM...
Implement the native Android class `PlaceAdapter` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: app/src/main/java/com/example/sunnyweather/ui/place/PlaceAdapter.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.example.sunnyweather.ui.place import android.content.Intent import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView import androidx.fragment.app.Fragment import androidx.recyclerview.widget.RecyclerView impor...
<|turn>user Implement the native Android class `PlaceAdapter` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: app/src/main/java/com/example/sunnyweather/ui/place/PlaceAdapter.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Ko...
Implement the Android ViewModel `MusicInfoViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state.
Repository path: app/src/main/java/com/theone/music/viewmodel/MusicInfoViewModel.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.theone.music.viewmodel import android.util.Log import androidx.lifecycle.viewModelScope import com.theone.music.data.model.CollectionEvent import com.theone.music.data.model.Music import com.theone.music.data.repository.DataRepository import com.theone.common.callback.databind.BooleanObservableFi...
<|turn>user Implement the Android ViewModel `MusicInfoViewModel` in Kotlin following modern Clean Architecture principles. Utilize StateFlow, viewModelScope, and Unidirectional Data Flow (UDF) to expose immutable UI state. Context: Repository path: app/src/main/java/com/theone/music/viewmodel/MusicInfoViewModel.kt Lan...
Implement the native Android class `RecyclerTestAdapter` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: test/libs/src/main/java/id/apwdevs/app/libs/util/RecyclerTestAdapter.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package id.apwdevs.app.libs.util import android.annotation.SuppressLint import android.util.Log import android.view.View import android.view.ViewGroup import androidx.paging.PagingDataAdapter import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.RecyclerView import id.apwdevs.app.d...
<|turn>user Implement the native Android class `RecyclerTestAdapter` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: test/libs/src/main/java/id/apwdevs/app/libs/util/RecyclerTestAdapter.kt Language: Kotlin Framework: AndroidX / Jetpack C...
Implement the native Android class `ImageUploadPreprocessorTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: imagekit/src/test/java/com/imagekit/android/preprocess/ImageUploadPreprocessorTest.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.imagekit.android.preprocess import android.app.Application import android.graphics.Bitmap import android.graphics.BitmapFactory import android.graphics.Point import com.imagekit.android.ImageKit import org.junit.After import org.junit.Assert.* import org.junit.Before import org.junit.Test import ...
<|turn>user Implement the native Android class `ImageUploadPreprocessorTest` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: imagekit/src/test/java/com/imagekit/android/preprocess/ImageUploadPreprocessorTest.kt Language: Kotlin Framework...
Configure modern type-safe Navigation Compose routes and destination mappings in Kotlin for `NavigationLifecycleMonitor` using Kotlinx Serialization.
Repository path: libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/internal/navigation/NavigationLifecycleMonitor.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.mapbox.services.android.navigation.v5.internal.navigation import android.app.Activity import android.app.Application import android.content.res.Configuration import android.os.Bundle import java.util.ArrayList internal class NavigationLifecycleMonitor( application: Application ) : Applicatio...
<|turn>user Configure modern type-safe Navigation Compose routes and destination mappings in Kotlin for `NavigationLifecycleMonitor` using Kotlinx Serialization. Context: Repository path: libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/internal/navigation/NavigationLifecycleMonitor.kt Lan...
Implement the native Android class `StretchPlanListFragment` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: stretchez/src/main/java/me/shangdelu/stretchez/ui/main/ui/dashboard/StretchPlanListFragment.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package me.shangdelu.stretchez.ui.main.ui.dashboard import android.graphics.Color import android.os.Bundle import android.view.* import android.widget.TextView import androidx.coordinatorlayout.widget.CoordinatorLayout import androidx.core.view.MenuHost import androidx.core.view.MenuProvider import androidx....
<|turn>user Implement the native Android class `StretchPlanListFragment` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: stretchez/src/main/java/me/shangdelu/stretchez/ui/main/ui/dashboard/StretchPlanListFragment.kt Language: Kotlin Fram...
Provide the native Android implementation for `RxSPTool.kt` in Kotlin with idiomatic patterns and proper error handling.
Repository path: RxKit/src/main/java/com/tamsiree/rxkit/RxSPTool.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.tamsiree.rxkit import android.content.Context /** * SharedPreferences工具类 * * @author tamsiree * @date 2016/1/24 */ object RxSPTool { private const val JSON_CACHE = "JSON_CACHE" /** * 存入自定义的标识的数据 可以近似的看作网络下载数据的缓存 * 单条方式存入 * * @param context 使用的上下文 * @param t...
<|turn>user Provide the native Android implementation for `RxSPTool.kt` in Kotlin with idiomatic patterns and proper error handling. Context: Repository path: RxKit/src/main/java/com/tamsiree/rxkit/RxSPTool.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines<turn|> <|turn>model ```kotlin pack...
Implement the native Android class `EnterCodeView` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: brd-android/registration/src/main/java/com/fabriik/registration/ui/views/EnterCodeView.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.fabriik.registration.ui.views import android.content.Context import android.graphics.* import android.text.InputFilter import android.text.InputType import android.util.AttributeSet import android.view.inputmethod.EditorInfo import androidx.appcompat.widget.AppCompatEditText import androidx.core....
<|turn>user Implement the native Android class `EnterCodeView` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: brd-android/registration/src/main/java/com/fabriik/registration/ui/views/EnterCodeView.kt Language: Kotlin Framework: AndroidX...
Implement the native Android class `OnLongTouchIncrementFiringSpeedFlow` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: InkBetterAndroidViews/src/main/java/com/inlacou/inkbetterandroidviews/listenerstoflow/OnLongTouchIncrementFiringSpeedFlow.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.inlacou.inkbetterandroidviews.listenerstoflow import android.view.MotionEvent import android.view.View import io.reactivex.rxjava3.core.ObservableEmitter import io.reactivex.rxjava3.core.ObservableOnSubscribe import kotlinx.coroutines.channels.ProducerScope import kotlinx.coroutines.channels.awa...
<|turn>user Implement the native Android class `OnLongTouchIncrementFiringSpeedFlow` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: InkBetterAndroidViews/src/main/java/com/inlacou/inkbetterandroidviews/listenerstoflow/OnLongTouchIncreme...
Implement the native Android class `FindNearestPharmacy` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: domain/src/main/java/com/example/domain/entity/pharmacySendRequest/FindNearstPharmacy.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.example.domain.entity.pharmacySendRequest import android.os.Parcelable import kotlinx.parcelize.Parcelize @Parcelize data class FindNearestPharmacy( val products: List<String> ): Parcelable ```
<|turn>user Implement the native Android class `FindNearestPharmacy` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: domain/src/main/java/com/example/domain/entity/pharmacySendRequest/FindNearstPharmacy.kt Language: Kotlin Framework: And...
Implement the native Android class `FindNearestPharmacy` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines.
Repository path: domain/src/main/java/com/example/domain/entity/pharmacySendRequest/FindNearstPharmacy.kt Language: Kotlin Framework: AndroidX / Jetpack Compose / Kotlin Coroutines
```kotlin package com.example.domain.entity.pharmacySendRequest import android.os.Parcelable import kotlinx.parcelize.Parcelize @Parcelize data class FindNearestPharmacy( val products: List<String> ): Parcelable ```
<|turn>user Implement the native Android class `FindNearestPharmacy` in Kotlin following idiomatic Kotlin 2.0+ conventions, structured concurrency, and AndroidX guidelines. Context: Repository path: domain/src/main/java/com/example/domain/entity/pharmacySendRequest/FindNearstPharmacy.kt Language: Kotlin Framework: And...