I am using Kotlin and right now android studio suggest me to add
This is a delicate API and its use requires care. Make sure you fully read and understand documentation of the declaration that is marked as a delicate API.
and when I click to
add @DelicateCoroutinesApi annotation to function
it added @DelicateCoroutinesApi
something like this
@DelicateCoroutinesApi
fun getAmount(activity: LoginActivity, user:FirebaseUser){
mFireStore.collection(Constants.AMOUNT).document(user.uid).get().
addOnSuccessListener { d ->
activity.amountGetSuccess( d, user)
}
}
when I use coroutine it suggests me let's see another example
@DelicateCoroutinesApi
private fun playsound() {
GlobalScope.launch {
withTimeout(10L) {
// play sound
val mPlayerPress = MediaPlayer.create(this, R.raw.button_press)
mPlayerPress.start()
}
}
my question is why this @DelicateCoroutinesApi what is the work of @DelicateCoroutinesApi