Eileen
01/08/2020, 2:07 PMCan
01/08/2020, 5:46 PMJoey
01/09/2020, 8:07 AM6 exceptions were raised by workers android
KamilH
01/09/2020, 9:57 AMFlow
wrapper around LiveData
and I have a problem, because it closes (invokeOnClose
is called) immediately after first value is emitted by Observer
.
fun <T> LiveData<T>.asFlow(): Flow<T> = channelFlow {
value?.let { offer(it) }
val observer = Observer<T> { t -> t?.let(this::offer) }
observeForever(observer)
invokeOnClose {
removeObserver(observer)
}
}
To be sure my CoroutineScope
is not causing this cancellation, I run this also in GlobalScope
and the behaviour was the same.
How can I see what is causing cancellation? I analysed stack trace, but I didn’t see anything interesting there.Ashutosh Panda
01/09/2020, 1:47 PMOfir Bar
01/09/2020, 8:15 PMA
01/09/2020, 8:51 PMmyanmarking
01/10/2020, 5:50 PMNikola Milovic
01/11/2020, 4:13 PMfun Login(email: String, password: String): TaskResult {
var taskResult = TaskResult.LOADING
firebaseAuth.signInWithEmailAndPassword(email,password).addOnCompleteListener {
if(it.isSuccessful){
taskResult = TaskResult.SUCCESS
}
}
return taskResult // THIS TRIGGERS BEFORE THE ONCOMPLETELISTENER, so I always get TaskResult.Loading back
}
I am also looking to run this in a coroutineManuel Lorenzo
01/12/2020, 5:21 PMtseisel
01/13/2020, 10:37 AMkapt
and Dagger
in multi-module projects ?
> Task :app:kaptDebugKotlin FAILED
e: error: cannot access HttpClientEngine
class file for io.ktor.client.engine.HttpClientEngine not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for io.ktor.client.engine.HttpClientEngine not found
It seems to occur because a dependency (Ktor-client in this case) is defined as implementation
in a different Gradle module (feature) than the one the component is created (app).dave08
01/13/2020, 10:47 AMGlobalScope
for coroutines that need to be tied to the Application
? There doesn't seem to be a lifecycleScope
for it... or is it better to create a CoroutineScope
and cancel it somewhere in the Application
?itnoles
01/13/2020, 10:30 PMSlackbot
01/14/2020, 8:59 AMMartin Nordholts
01/14/2020, 1:01 PM01-14 11:40:10.990 4508 4508 E AndroidRuntime: FATAL EXCEPTION: main @coroutine#4
01-14 11:40:10.990 4508 4508 E AndroidRuntime: Process: com.readly.client, PID: 4508
I am running with
System.setProperty(kotlinx.coroutines.DebugKt.DEBUG_PROPERTY_NAME, kotlinx.coroutines.DebugKt.DEBUG_PROPERTY_VALUE_ON)
but still get the above silent fail.
What is the best way to find what coroutine this is? (Without using “brute force”)Nikola Milovic
01/14/2020, 8:54 PMTim Malseed
01/15/2020, 4:13 AMandroidx.core.graphics.*
Kashif
01/15/2020, 10:15 AMKulwinder Singh
01/15/2020, 2:14 PMschema.json
for github graphql api ?
sorry i know its not kotlin related but i have searched a lot on google but not found anythingNikhil
01/16/2020, 9:17 AMTolriq
01/16/2020, 4:16 PM{
"mappings": {}
}
itnoles
01/17/2020, 2:16 AMJoey
01/17/2020, 4:35 AMaipok
01/17/2020, 7:36 AMI want to try the new thing
, why I want to switch to kotlin dsl for build files. I'm asking this, because I'm seeing a bunch of minuses with the IDE support (Android Studio in particular). Will start with pros though... DSL and kotlin build src will give an ability to nicely handle dependencies and it is working like a charm and looks clean etc. With only one minus, that ruins everything. The IDE suggestions for libraries updates are not detected anymore and not possible. Same for flavor dimentions
if they are defined in kotlin object constans, the IDE shows warning, that no dimention are being added to any of the flavors. The build time is also increased for about a minute (with normal 6 minutes build time, it is now about 7 minutes). Does anyone knows what are the plans for support kotlin DSL from the Android Studio side? (just for reference, everything I descibed was tested with latest Android Studio 4.0 canary 😎Can
01/17/2020, 9:29 AMWRITE_EXTERNAL_STORAGE
on an Android 10 devices - any known workarounds?Bin
01/17/2020, 11:14 AMfun onShareClick() {
val intentShareList = ArrayList<Intent>()
val shareIntent = Intent()
shareIntent.action = Intent.ACTION_SEND
shareIntent.type = "text/plain"
val resolveInfoList = packageManager.queryIntentActivities(shareIntent, 0)
for (resInfo in resolveInfoList) {
val packageName = resInfo.activityInfo.packageName
val name = resInfo.activityInfo.name
if (packageName.contains("com.facebook") ||
packageName.contains("com.twitter.android") ||
packageName.contains("<http://com.google.android.gm|com.google.android.gm>") ||
packageName.contains("com.android.mms") ||
packageName.contains("com.whatsapp")
) {
val intent = Intent()
intent.component = ComponentName(packageName, name)
intent.action = Intent.ACTION_SEND
intent.type = "text/plain"
intent.putExtra(Intent.EXTRA_SUBJECT, "Your Subject")
intent.putExtra(Intent.EXTRA_TEXT, "Your Content")
intentShareList.add(intent)
}
}
if (intentShareList.isEmpty()) {
Toast.makeText(this@MainActivity, "No apps to share !", Toast.LENGTH_SHORT).show()
} else {
val chooserIntent = Intent.createChooser(intentShareList.removeAt(0), "Share via")
chooserIntent.putExtra(
Intent.EXTRA_INITIAL_INTENTS,
intentShareList.toTypedArray()
)
startActivity(chooserIntent)
}
}
}
Thomas Nordmeyer
01/17/2020, 11:19 AMiex
01/17/2020, 5:26 PMJsonParser().parse("2020-01-17T18:21:15+0100")
Gunis
01/18/2020, 12:54 PMDavid Martin
01/18/2020, 2:15 PMDavid Martin
01/18/2020, 2:15 PMrkeazor
01/19/2020, 1:57 AMAndrew
01/19/2020, 2:51 AMDavid Martin
01/19/2020, 12:33 PM