Tamal Anwar Chowdhury
04/10/2024, 9:22 AMKawa
04/11/2024, 1:03 PMAbhimanyu
04/11/2024, 7:28 PMgts13
04/12/2024, 1:00 PMCoroutineWorker
for a n*not* persistent work, with WorkManager
like this example here, would my app show a notification when the work is executing?
I want to confirm this won't happen!Jeremy Koppel
04/12/2024, 7:01 PMSettings -> Build, Execution, Deployment
-> Debugger
-> Stepping
, and I added in both a *.java
pattern and a *.class
pattern, but it’s had no effect.pers
04/14/2024, 9:03 PMfun loadUsersByRegion(regions: List<String>): Flow<List<User>>
I want to call fetchInfo on each item without nesting map....
fun fetchInfo(user: User): Info
is there any better?
.flatMapConcat { users ->
flow {
val usersInfo = users.map { user -> fetchInfo(user) }
emit(usersInfo)
}
}
Vishal Bhandare
04/15/2024, 7:01 AMdan
04/15/2024, 12:47 PMRohan Gupta Kandikonda
04/15/2024, 2:21 PMCarlos Monzon
04/16/2024, 9:21 AMAzmi Radi
04/16/2024, 9:51 AMSaid Shatila
04/16/2024, 12:50 PMLee
04/17/2024, 3:44 AMHasan Tunçay
04/17/2024, 1:11 PMJonny
04/18/2024, 10:38 AM@RequiresPermission(allOf = [
android.Manifest.permission.BLUETOOTH,
android.Manifest.permission.BLUETOOTH_ADMIN,
android.Manifest.permission.ACCESS_COARSE_LOCATION,
])
If I change it to
@RequiresPermission(allOf = [
android.Manifest.permission.BLUETOOTH_SCAN,
android.Manifest.permission.BLUETOOTH_CONNECT
])
I will get warnings about minSdk. So does this mean I can't use this annotation since the permissions I need are different depending on OS?Nurlibay
04/18/2024, 2:25 PMNicholas Douso
04/19/2024, 2:51 AMMr U9Q
04/19/2024, 12:15 PMAlexandra Gnimadi
04/19/2024, 2:33 PMhisham bin awiad
04/21/2024, 11:04 AMPratyush
04/22/2024, 4:27 AMam414
04/22/2024, 10:36 AMBinod Basnet
04/22/2024, 4:53 PMSlackbot
04/22/2024, 11:18 PMBinod Basnet
04/23/2024, 8:25 AMobject FileDownloaderUtils {
@JvmStatic
fun fileDownloader(
context: Context,
fileUrl: String,
outputFileName: String,
directoryName: String
) {
val modelsDir = File(context.filesDir, directoryName)
if (!modelsDir.exists()) {
modelsDir.mkdirs()
}
val outputFile = File(modelsDir, outputFileName)
if (!outputFile.exists()) {
val client = OkHttpClient()
val request = Request.Builder().url(fileUrl).build()
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
e.printStackTrace()
}
override fun onResponse(call: Call, response: Response) {
if (!response.isSuccessful) {
throw IOException("Failed to download file: ${response.message}")
} else {
// Handle the input stream
val inputStream = response.body?.byteStream()
val fileOutputStream =
FileOutputStream(File(context.filesDir, outputFileName))
inputStream?.use { input ->
fileOutputStream.use { output ->
input.copyTo(output)
}
}
}
}
})
}
}
}
Why this code doesnt execute after this line client.newCall(request).enqueue(object : Callback ) I have the binaryfile to download , url successfully download file when downloading from the browser but using okhttp it doesnt download, give me some suggestionBinod Basnet
04/23/2024, 1:36 PMNitin Praksh
04/23/2024, 1:56 PMJEYASTINE PUSHPARAJ
04/24/2024, 10:40 AMpp.amorim
04/25/2024, 1:02 PMinternal const val
. Follow the thread:hisham bin awiad
04/25/2024, 2:29 PMcanvas.drawText()
how can make text RTL by kotlin