Nikola Milovic
06/07/2020, 9:16 AMSize size = cameraSource.getPreviewSize();
getPreviewSize is is unresolved, it's the OCRReader sample from google
cameraSource
only has get flash,focus and facing, no parameters or sizeKulwinder Singh
06/08/2020, 10:12 AMcopy
function of data
class have if called many times ??
for example i have data class Position(val x:Float,val y:Float)
and i'm doing copy
of this class's instance inside android's touch listener when user's finger is moved(ACTION_MOVE) like ->
var position = Position(0f, 0f)
view.setOnTouchListener { v, event ->
when (event.action){
MotionEvent.ACTION_DOWN -> /**/
MotionEvent.ACTION_MOVE -> {
position = position.copy(x =computedX,y=computedY)//how much performance impact of this ??
}
}
}
i don't want to use mutable properties for data class for some reasonsShawn Witte
06/09/2020, 1:40 AMwhile(true) {
delay(interval)
updateDataObject()
}
Then I'm thinking of launching a coroutine in my ViewModel that looks the same except it's pulling the data out of the binding after each interval instead of generating it.
Is there a better way with Channels or Flow? Or is this a reasonable approach?TarunY
06/09/2020, 9:25 AMpascalchidi
06/09/2020, 7:47 PMMark
06/10/2020, 7:16 AMEvent
wrapper since dialog is persisted through configuration changes when using navigation component. The view layer would be responsible for `complete`ing the deferrable when the user clicks an item.
val itemSelectorLiveData = MutableLiveData<Event<Pair<List<String>, CompletableDeferred<String>>>>()
suspend fun doSomethingFunButWorthwhile(): Boolean {
val items: List<String> = workOutWhichItemsToChooseFrom()
val deferredItem = CompletableDeferred<String>()
itemSelectorLiveData.postValue(Event(Pair(items, deferredItem)))
// wait for user to select item
val selectedItem = deferredItem.await()
return doSomethingWorthwhile(selectedItem)
}
Jamie Craane
06/10/2020, 10:23 AMParcelFileDescriptor.open(file, ParcelFileDescriptor.parseMode(mode))
it works from Gmail. This is using the
readFilesUsingOpenDocumment() function.
- When I read in the contents and use createReliablePipe, I can get the contents in the sample app but not in Gmail., which gives the following exception:
2020-06-10 09:15:31.643 14097-14235/nl.jcraane.myapplication E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: nl.jcraane.myapplication, PID: 14097
Caused by: java.io.IOException: write failed: EPIPE (Broken pipe)
This is using the readFileUsingReliablePipe() function.
- When I use createReliablePipe and I do not use a ASyncTask, the app hangs when large amounts (more than a couple of Kb) of data are transferred.
Does anyone have more insights in how openDocument should be implemented? Ideally I also want to download files via a URL and stream the bytes back when the download is finished. Is there a possibility of letting the calling app know a download is in progress (to show a progress bar)? How should createReliablePipe be used correctly?
Thanks!Anastasia Finogenova
06/10/2020, 1:08 PMMatti MK
06/10/2020, 4:28 PMErik
06/10/2020, 9:44 PMJavier
06/10/2020, 9:45 PMkrtko
06/11/2020, 5:07 AMSaurabh Thorat
06/11/2020, 7:33 PMallan.conda
06/12/2020, 4:51 AM/.gradle/caches/transforms-2/files-2.1/08b4d730ba6c80c87328a0558e314dae/jetified-kotlin-stdlib-jdk7-1.3.72.jar: Runtime JAR file has version 1.3 which is older than required for API version 1.4
Samyak Jain
06/12/2020, 8:36 AMtasks {
withType<KotlinCompile> {
kotlinOptions.jdkHome = rootProject.extra["JDK_18"] as String
kotlinOptions.languageVersion = "1.2"
kotlinOptions.apiVersion = "1.2"
kotlinOptions.freeCompilerArgs += listOf("-Xskip-metadata-version-check")
}
named<ProcessResources>("processResources") {
val propertiesToExpand = mapOf("projectVersion" to project.version)
for ((name, value) in propertiesToExpand) {
inputs.property(name, value)
}
filesMatching("project.properties") {
expand("projectVersion" to project.version)
}
}
named<Jar>("jar") {
callGroovy("manifestAttributes", manifest, project)
}
named<ValidateTaskProperties>("validateTaskProperties") {
failOnWarning = true
}
named<DokkaTask>("dokka") {
outputFormat = "markdown"
includes = listOf("$projectDir/Module.md")
}
}
Lilly
06/12/2020, 3:40 PM:buildSrc:generatePrecompiledScriptPluginAccessors
fails with the message "Caused by: org.gradle.api.plugins.InvalidPluginException: An exception occurred applying plugin request [id: 'android']" and a lot of other errors. I'm using AS 4.2 C1, when I switch AGP back to version 4.1.0-beta01 it runs the task properly. Are there any breaking changes in the new AGP version?Lilly
06/12/2020, 9:24 PMScaffold(bodyContent = { // code here is called twice })
is called twice? I'm using dev13 but same problem with dev12. I can't test the other versions because my project fails otherwise.
EDIT: sorry wrong channel.Mohamed Ibrahim
06/12/2020, 10:10 PMgauravm8
06/13/2020, 6:56 AMAkram
06/13/2020, 8:49 PMtransitionToEnd()
but it is acting weirdly any help?The Birdwatcher
06/14/2020, 1:09 AMvesp
06/14/2020, 9:00 AMSandesh Baliga
06/14/2020, 1:08 PMharoldadmin
06/15/2020, 6:20 AMTarunY
06/15/2020, 8:14 AMKamil Kalisz
06/15/2020, 8:21 AMNikhil Soni
06/15/2020, 11:09 AMKaushik
06/15/2020, 11:32 AMluke_c
06/15/2020, 9:53 PMAttila Blenesi
06/16/2020, 12:06 PMAttila Blenesi
06/16/2020, 12:06 PMRyan
06/16/2020, 12:08 PMAttila Blenesi
06/16/2020, 12:28 PMval text = "👩👩👧👧 user perceived characters 👍🏽"
print(text[0])
?
👩👩👧👧 = \u200D\uD83D\uDC69\u200D\uD83D\uDC67\u200D\uD83D\uDC66
Android Studio does not support Zero Width Joiner characters so it look like this in the IDE:Ryan
06/16/2020, 12:28 PMAttila Blenesi
06/16/2020, 12:35 PMAdded in API level 24
Gonçalo Palaio
06/16/2020, 6:26 PMAttila Blenesi
06/20/2020, 11:56 AM