ruiter
08/12/2021, 11:39 AModay
08/12/2021, 2:43 PMbuildSrc
directory which I’ve cleaned up and no longer need right now, but i still see it being built on every ..build, I cannot seem to find the directive that is letting gradle know that it needs to do this, i would like to stop doing this, how can I?Samiullah Kalhoro
08/12/2021, 9:06 PMAmir Rudd
08/13/2021, 5:10 AMPardeep Sharma
08/13/2021, 12:21 PM'navigator:kaptGenerateStubsDebugKotlin FAILED'
error.
I am really blocked and could not move forward due to the Gradle error. The full logs:Chris Fillmore
08/13/2021, 3:27 PMOmotayo
08/14/2021, 8:37 PMOmotayo
08/14/2021, 8:38 PMOmotayo
08/14/2021, 8:39 PMCicero
08/15/2021, 11:07 AMCicero
08/15/2021, 11:44 AMursus
08/15/2021, 1:37 PMrajesh
08/16/2021, 12:19 PMPost
, and it has property called isLiked
. I want to retrieve its value in repository class to determine whether to like or unlike a post. I'm using below code but app automatically crash with I/Process: Sending signal. PID: 12911 SIG: 9
when using below code block. what am i doing wrong?
@Query("SELECT * FROM posts WHERE postId = :postId")
fun isPostLiked(postId: Long): Post
suspend fun toggleLike(postId: Long) {
Log.d(TAG, "inside toggle like")
if (db.postDao.isPostLiked(postId = postId).isLiked == true) {
Log.d(TAG, "unlike post")
} else {
Log.d(TAG, "like post")
}
}
Yuval Dryer
08/16/2021, 3:35 PMsuhas
08/17/2021, 9:35 AMDuration
class. Is that the right approach?
2021-08-17T12:00:00.235Z
- Give a time like this, I need to find the hours and mins left from my local time.curtjrees
08/17/2021, 1:29 PMPhongBM
08/18/2021, 4:03 AMsuhas
08/18/2021, 12:28 PMTravis Griggs
08/18/2021, 11:49 PMBase64.decode("eF4Nzr1NBDEQQGEjQXot3FZw8nj8mxIcyUIAghTNeMawWsHB7SJ0HVABvdEANRDi_HvSO9s-0ki3o77vp7s8PrT7WU_m_Pfv5-v7Qj7UbKyiUCGEQiASLETHDBI4i8ekIXOBVCNgspxraYKIvrYQsYSKVIEzOxsokDbffZHCyQljlqjFJ3HNN6kdFK-xiPfJZhbHVYmsBfNGy9KnwGw92F5WdMm21neeD8s6idnsrk_D5fQ07Gkdro6q83Cj6-fhOJtXelFj_gHcOkP7", Base64.NO_PADDING or Base64.NO_WRAP or Base64.URL_SAFE)
In an InstrumentTest (so runs on the device) works fine. But run it from a simple unit test (which runs on the development box--mac os in this case--i believe), and it fails. returns null every time. Gives me the heeby jeebies about relying on unit tests.g4sarma
08/19/2021, 10:05 AMHovhannes
08/20/2021, 1:41 PMFragment
private var instance: LoginFragment? = null
private val viewModel by viewModels<AuthViewModel>()
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding = FragmentLoginBinding.bind(view)
instance =this
}
fun login(): String {
viewModel.login(clientId, partner.toString(), password)
val clientId = binding.editTextTextEmailAddress.text.toString().trim()
val encrypted = encrypt(clientId, publicKey)
return encrypted
}
RemoteDataSource
private fun getRetrofitClient(): OkHttpClient {
val str= LoginFragment().getInstance()?.login()
....Andre Stefanov
08/22/2021, 12:35 PMsuhas
08/22/2021, 1:15 PMTarunY
08/22/2021, 5:41 PMOrhan Tozan
08/23/2021, 10:33 AMSololo
08/23/2021, 11:54 AMCamera.CAMERA_ERROR_EVICTED
on camera.setErrorCallback {}
callback.Stylianos Gakis
08/23/2021, 3:23 PMVyshas
08/23/2021, 4:45 PMlawlorslaw
08/23/2021, 7:53 PMNo cast needed
i tried adding the suppress annotation but still get the same warning
@Suppress("UNCHECKED_CAST")
val viewStub = (parentBottomTabs as ViewStub)
How do i properly suppress this warning?Jason Inbody
08/24/2021, 12:07 AMrememberLauncherForActivityResult
to hit. What I have gotten to work is to write my own activity class to handle the facebook callback and I'm able to get the token from facebook. The problem is I don't know how to pull the token out of an activity as I can't pass any callbacks into the activity... I was looking into maybe using a broad cast receiver to send the token out of the activity result back to the jetpack compose code. I'm newish to android so unsure if the broadcast receiver is the best way to do this? Is there better ways to send a string out of an activity than that?Jason Inbody
08/24/2021, 12:07 AMrememberLauncherForActivityResult
to hit. What I have gotten to work is to write my own activity class to handle the facebook callback and I'm able to get the token from facebook. The problem is I don't know how to pull the token out of an activity as I can't pass any callbacks into the activity... I was looking into maybe using a broad cast receiver to send the token out of the activity result back to the jetpack compose code. I'm newish to android so unsure if the broadcast receiver is the best way to do this? Is there better ways to send a string out of an activity than that?override fun onSuccess(loginResult: LoginResult?) {
val token = loginResult?.accessToken?.token
intent.putExtra("token", token)
}
I set the putExtra to token. In my compose code I start a thread waiting for the token to be set
Thread {
while (intent.getStringExtra("token") == "") {
val tok = intent.getStringExtra("token")
Thread.sleep(1000)
}
val token = intent.getStringExtra("token")
}.start()
I verify with break points that the token is being sent but when I set the break point back in my thread the token is never set...