Breaker ACT
01/11/2022, 4:35 AMMilan Vadhel
01/11/2022, 10:06 AMjava.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@57f2dd45: AdapterService getBondedDevices
Even though my app does not any requirement for bluetooth related feature. Does anyone know about this exception?Akhil Jain
01/11/2022, 11:08 AMandroid:exported
flag to every activity/receiver/services/provider tags present in my manifest file. But still I am getting this error.
Manifest merger failed : android:exported needs to be explicitly specified for <receiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined.
So I am guessing this issue is due to any 3rd party library whose manifest contains a receiver without android:exported
flag.
I have also checked merged manifest file for missing android:exported
in components of any third party libraries. But in merged manifest file also all activity/receiver/services tags has exported flag.
So how can I find that missing receiver which is causing the issue.Asim Khatri
01/11/2022, 12:47 PMLucca Beurmann
01/11/2022, 5:52 PM@Test
fun `Should show api error when create request token fails`() = runTest {
every { loginRepository.createRequestToken() } returns flow {
emit(
Source.Error(
NetworkError(400, "error")
)
)
}
viewModel.events.test {
viewModel.onLoginClick()
verify(exactly = 1) { loginRepository.createRequestToken() }
confirmVerified(loginRepository)
Truth.assertThat(viewModel.isButtonLoading.value).isFalse()
Truth.assertThat(awaitItem())
.isInstanceOf(LoginEvents.ShowApiError::class.java)
cancelAndConsumeRemainingEvents()
}
}
When i run this test the Truth assert that verifies the event succeeds, but mockk throws an error saying that repository,createRequestToken() wans't calledFabio Rachid
01/11/2022, 10:14 PMTong Zhang
01/13/2022, 6:34 AMpublic abstract class Task<TResult> {
public Task() {
}
public abstract <X extends Throwable> TResult getResult(@NonNull Class<X> var1) throws X;
@Nullable
public abstract Exception getException();
}
java getResult method how to convert to koltin code
abstract class Task<TResult> {
@Throws(X::class)
abstract fun <X : Throwable> getResult(var1: Class<X>): TResult
}
Oleksii
01/13/2022, 3:24 PMVivek Modi
01/13/2022, 4:27 PMIgor Milakovic
01/13/2022, 5:23 PMIntent
and host my NewScreenFragment
in the NewActivity
? Or is it better to just replace the CurrentScreenFragment
with NewScreenFragment
(and add it to back stack) in the CurrentActivity
and then adjust the action bar (back button, menus etc)?
Finally, to top it all off, I want to apply the coordinator pattern on all that so I don't tight couple the flows within Activities/Fragments.
Thank you very much in advance!Ameen Essa
01/14/2022, 1:47 AMArun Joseph
01/14/2022, 9:06 AMMassimo Canonico
01/14/2022, 11:19 AMMassimo Canonico
01/14/2022, 11:19 AMVivek Modi
01/14/2022, 2:47 PMsealed class
example. But I am confused little bit, how can I achieved this. Is I am doing right for my scenario or not?Francesc
01/14/2022, 5:18 PMsealed interface
within a sealed interface
I can't have an exhaustive when with the outer sealed interface
entries (see example in thread). What's the reason for this?spierce7
01/14/2022, 7:28 PMRoudy Korkis Kanaan
01/17/2022, 10:57 AMMarcin Wisniowski
01/17/2022, 10:59 AMAlaa Al
01/17/2022, 4:31 PMprivate val _qualifications: MutableStateFlow<List<QualificationView>?> = MutableStateFlow(null)
val qualifications:StateFlow<List<QualificationView>?> = _qualifications
I’m trying to use qualifications between parent fragment and bottomSheet, but consumer collects list just once.
Screenshot of the code below.Vivek Modi
01/17/2022, 10:53 PMcollectLatest
is calling twice and sometimes even more. I printed the log inside my collectLatest
function it print the log.An Tran
01/18/2022, 3:39 AMMassimo Canonico
01/18/2022, 10:49 AMMassimo Canonico
01/18/2022, 10:58 AMFedora
01/18/2022, 4:08 PM[
{
"type" : "food",
"value" : "pizza, buger, pasta"
},
{
"type" : "drink",
"value" : "soda, Mountain Dew, redbull"
}
]
Umar Ata
01/18/2022, 5:50 PMAli
01/19/2022, 12:14 PMdata class A(
val metadata: String
){
data class B(
val metadata: String
)
}
fun updateData(data: Any){
when(data){
is A -> {// update A metadata value
}
is A.B -> {// update B metadata value
}
}
}
want to update the value of metadata
for both data class by using the same logic and don't want to write it twice inside when statement. How can I do it by writing the logic only once?Rahul Ray
01/19/2022, 2:45 PMstaging {
applicationIdSuffix ".staging"
}
but I am getting this error
Caused by: org.gradle.api.GradleException: No matching client found for package name
I can fix this by creating seperate sourceSets and put seperate google_services.json files in them.
Now I don't want to create seperate sourceSets for staging and prod build types.
Can anyone suggest me a solution to this?Rizwan Minhas
01/19/2022, 3:19 PMRizwan Minhas
01/19/2022, 3:19 PMheckfyxe
01/19/2022, 4:11 PMRizwan Minhas
01/20/2022, 12:05 PMheckfyxe
01/20/2022, 2:00 PMRizwan Minhas
01/20/2022, 2:02 PMMark Sheekey
01/25/2022, 8:46 PM