Martin Sloup
06/26/2020, 6:38 AM[INFO] Processing java sources with annotation processors: [*redacted*]
C:\Users\arcao\project\app\build\generated\source\kapt\debug\com\example\app\DataBinderMapperImpl.java:131: error: cannot find symbol
import com.example.app.databinding.ViewListItemBindingImpl;
^
symbol: class ViewListItemBindingImpl
Note: [1] Wrote GeneratedAppGlideModule with: [com.bumptech.glide.integration.okhttp3.OkHttpLibraryGlideModule]
> Task :app:kaptDebugKotlin FAILED
location: package com.example.app.databinding
lawlorslaw
06/26/2020, 3:56 PMerror: [Dagger/MissingBinding] java.lang.String cannot be provided without an @Inject constructor or an @Provides-annotated method.
my class looks like this
class InstructorProfileState @Inject constructor(
val instructorId: String
) {
sealed class ViewCommand {
class SetInstructorData(val instructor: Instructor) : ViewCommand()
}
val viewCommandStream = SingleLiveEvent<ViewCommand>()
}
Slackbot
06/26/2020, 5:51 PMRemon Shehata
06/26/2020, 6:23 PMminifyEnabled true
shrinkResources true
inside build grade(module:app)
I have a few data classes that I want to keep as is. what should I search for?Tomáš
06/26/2020, 6:51 PMrajesh
06/27/2020, 5:41 AMSlackbot
06/27/2020, 2:18 PMAzhar
06/27/2020, 5:55 PMmanlan
06/28/2020, 1:04 PMstopProgress()
in each of the observers. Is there a better way? 😞 Can I make this generic so I do not have to do this in each and every fragment?Mo
06/28/2020, 4:02 PMAkram
06/28/2020, 6:29 PMKProperty
it is working well in debugging , the problem is with r8 obfuscation i'm getting app crashing is there other way to do this ? here is my codeTarunY
06/28/2020, 7:11 PMGeorgii Goncharik
06/28/2020, 10:10 PMGuy Bieber
06/29/2020, 6:15 PM// Get the EC key generator. Has to be the OpenSSL version
val kpg: KeyPairGenerator = KeyPairGenerator.getInstance(
"EC", "AndroidOpenSSL")
val parameterSpec = ECGenParameterSpec("AndroidOpenSSL)"
//initialize and generate the keypair
kpg.initialize(parameterSpec)
val kp = kpg.generateKeyPair()
I need to be able to store and retrieve this using the android keystore, however there doesn’t seem to be a way get the self signed certificate needed to store the key pair:
val certArray : Array<Certificate> = arrayOf(certificate)
//var certPath = PublicKeyToX509Cert(keyPair.public)
keyStore.setKeyEntry(alias, keyPair.private.encoded, certArray)
Basically the first certificate in the certArray needs to be the public key certificate.
So the core question is how do I get from a publicKey to a certificate?Madalin Valceleanu
06/29/2020, 6:30 PMsingle-activity architecture
, using the Navigation component to manage fragment operations.
• Android architecture components
, part of Android Jetpack give to project a robust design, testable and maintainable.
• Pattern Model-View-ViewModel
(MVVM) facilitating separation of development of the graphical user interface.
• S.O.L.I.D
design principles intended to make software designs more understandable, flexible and maintainable.
• Modular app architecture
allows being developed features in isolation, independently from other features.
Project link: https://github.com/VMadalin/android-modular-architectureluke_c
06/30/2020, 1:48 PMjuliocbcotta
07/02/2020, 12:04 PMJabez Magomere
07/02/2020, 1:18 PMviewModelFactory lateinit has not been initialized errpr
when injecting a dagger view model factory into a fragment and initialising the viewmodel using viewmodel lazy delegate property, here is a snippet of my code..
Error :
Fatal Exception: kotlin.UninitializedPropertyAccessException
lateinit property viewModelFactory has not been initialized
Code:
class DeliveriesFragment() : Fragment(){
@Inject
lateinit var daggerViewModelFactory: DaggerViewModelFactory
private val upcomingDeliveriesViewModel : UpcomingDeliveriesViewModel by viewModels { daggerViewModelFactory }
override fun onAttach(context: Context) {
SalesApplication.salesComponent().inject(this)
super.onAttach(context)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
observeDeliveries()
}
private fun observeDeliveries(){
upcomingDeliveriesViewModel.loadUpcomingUserDeliveries("").observe(viewLifecycleOwner, Observer {
//displayList()
})
}
}
rahul_lohra
07/03/2020, 4:46 PMLeon johnson
07/04/2020, 4:05 AMRaptorDroid
07/04/2020, 6:33 AMprivate val results = MediatorLiveData<Result>()
private val dataSource = getData() // returns LiveData<Result>
results.addSource(dataSource){data->
if(hasNetwork){
fetchDatafromNetwork(data)
}else{
results.value = data
}
}
Hey guys I am new to RxJava and Android how can i write this in rxJava. what i mean is what can be used inplace of mediatorlivedata or how can this example can be written i nrxjava?
ThanksNikola Milovic
07/04/2020, 10:38 AMViktor VAD
07/04/2020, 4:45 PMGestureDetector
like shown here. Can anyone link me some examples that I can learn from, please? I'm digging Google hard, but since I'm new, it's hard to ask the right questions.jnyakush
07/05/2020, 3:12 AMmanlan
07/05/2020, 7:46 AMfindNavController().navigate(R.id.showDetailScreen)
Myraboh
07/06/2020, 7:26 AMSlackbot
07/06/2020, 8:42 AMSlackbot
07/06/2020, 10:29 AMSlackbot
07/06/2020, 3:14 PMTravis Griggs
07/06/2020, 6:13 PMthis.mainLayout.removeCallbacks(this::stopConnecting)
But if the following does:
val stopConnectingRunnable = Runnable { this.stopConnecting() }
this.mainLayout.removeCallbacks(this.stopConnectingRunnable)
We thought (erroneously apparently and to much confusion/frustration) that the first would work.Travis Griggs
07/06/2020, 6:13 PMthis.mainLayout.removeCallbacks(this::stopConnecting)
But if the following does:
val stopConnectingRunnable = Runnable { this.stopConnecting() }
this.mainLayout.removeCallbacks(this.stopConnectingRunnable)
We thought (erroneously apparently and to much confusion/frustration) that the first would work.ephemient
07/06/2020, 10:38 PMMark Murphy
07/06/2020, 11:49 PMremoveCallbacks()
takes not just any Runnable
, but the Runnable
that you registered previously using post()
or postDelayed()
. So, you need to have a reference to the real Runnable
that you used originally.
If in your second code snippet you used stopConnectingRunnable
for the original postDelayed()
call (or whatever) and for the removeCallbacks()
call, that is why it works.
Conversely, if you let the compiler convert your function reference into a Runnable
in both of those places, they would be different Runnable
objects, and the removeCallbacks()
one would not match the originally-registered one.