hfhbd
08/03/2021, 12:52 PM// shared module, not depending on android
interface Dao {
suspend fun getAll(): List<A>
}
// android
@Dao
interface RoomDao {
@Query("select * from a")
override suspend fun getAll(): List<A>
}
I am always getting An abstract DAO method must be annotated with one and only one of the following annotations: Insert,Delete,Query,Update,RawQuery - Dao.getAll()
Do I really have to annotate the Dao.getAll
too, even if I override this function in RoomDao with the one annotation?
https://medium.com/androiddevelopers/7-pro-tips-for-room-fbadea4bfbd1#dd40pollux-
08/04/2021, 4:00 AM<receiver
android:name="org.kp.m.arrivalnotification.usecase.BluetoothStatusReceiver"
>
<intent-filter>
<action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
</intent-filter>
</receiver>
this doesn’t help. I was thinking, this is exempted list of receivers 🤔
Appreciate the help in advance 😇KL3B3R
08/04/2021, 4:05 AMAnshulupadhyay03
08/04/2021, 7:22 AMenum class Type(val value: String, val colorCode: String) {
BUY("B", GREEN),
SELL("S", RED),
UNKNOWN("", "");
private companion object {
private const val GREEN = "#3fc963"
private const val RED = "#e35353"
}
}
it is showing compile error on GREEN and RED as it should be initialized. i have init in the companion obj why is the error then?Shalu TD
08/04/2021, 12:51 PMSlackbot
08/04/2021, 7:59 PMharis mehmood
08/05/2021, 9:29 AM{
"responseCode": 200,
"message": "Success",
"response": {
"Items": [
{
"purpose": "Instant Checkup",
"date": "16 Jul 2021",
"created_at": "Fri, 16 Jul 2021 09:54:10 +0000",
"uuid": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3",
"amount": 1500,
"Version": "2012-10-17",
"Id": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f6"
},
{
"purpose": "Instant Checkup",
"date": "16 Jul 2021",
"created_at": "Fri, 16 Jul 2021 09:54:10 +0000",
"uuid": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3",
"amount": 1500,
"Version": "2012-10-17",
"Id": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f9"
},
{
"purpose": "Instant Checkup",
"date": "16 Jul 2021",
"created_at": "Fri, 16 Jul 2021 09:54:10 +0000",
"uuid": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3",
"amount": 1500,
"Version": "2012-10-17",
"Id": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f1"
},
{
"purpose": "Instant Checkup",
"date": "16 Jul 2021",
"created_at": "Fri, 16 Jul 2021 09:54:10 +0000",
"uuid": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3",
"amount": 1500,
"Version": "2012-10-17",
"Id": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f7"
},
{
"purpose": "Instant Checkup",
"date": "16 Jul 2021",
"created_at": "Fri, 16 Jul 2021 09:54:10 +0000",
"uuid": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3",
"amount": 1500,
"Version": "2012-10-17",
"Id": "4aa792da-2ef8-4253-8c7c-3e3f6b9f1511"
},
{
"purpose": "Instant Checkup",
"date": "16 Jul 2021",
"created_at": "Fri, 16 Jul 2021 09:54:10 +0000",
"uuid": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3",
"amount": 1500,
"Version": "2012-10-17",
"Id": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3"
},
{
"purpose": "Instant Checkup",
"date": "16 Jul 2021",
"created_at": "Fri, 16 Jul 2021 09:54:10 +0000",
"uuid": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3",
"amount": 1500,
"Version": "2012-10-17",
"Id": "4aa792da-2ef8-4253-8c7c-3e3f6b9f1510"
},
{
"purpose": "Promotion",
"date": "16 Jul 2021",
"created_at": "Fri, 16 Jul 2021 09:54:10 +0000",
"uuid": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3",
"Version": "2012-10-17",
"amount": 500,
"Id": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f5"
},
{
"purpose": "Instant Checkup",
"date": "16 Jul 2021",
"created_at": "Fri, 16 Jul 2021 09:54:10 +0000",
"uuid": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3",
"amount": 1500,
"Version": "2012-10-17",
"Id": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f2"
},
{
"purpose": "Appointment fee",
"date": "16 Jul 2021",
"created_at": "Fri, 16 Jul 2021 09:54:10 +0000",
"uuid": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f3",
"Version": "2012-10-17",
"amount": 1000,
"Id": "4aa792da-2ef8-4253-8c7c-3e3f6b9f15f4"
}
],
"Count": 10,
"ScannedCount": 10,
"LastEvaluatedKey": "eyJJZCI6ICI0YWE3OTJkYS0yZWY4LTQyNTMtOGM3Yy0zZTNmNmI5ZjE1ZjQiLCAidXVpZCI6ICI0YWE3OTJkYS0yZWY4LTQyNTMtOGM3Yy0zZTNmNmI5ZjE1ZjMifQ=="
}
}
Can we use this kind of response For paging library 3 ?Vivek Modi
08/05/2021, 2:18 PMBen Dodson
08/05/2021, 4:19 PMSlackbot
08/06/2021, 3:37 AMmagnumrocha
08/06/2021, 11:23 AM@Parcelize
on kotlin sealed classes:
sealed class MySealedClass : Parcelable {
@Parcelize object Object1: MySealedClass()
@Parcelize object Object2: MySealedClass()
@Parcelize object Object3: MySealedClass()
}
I am getting the error:
android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.myapp.data.MySealedClass$Object1
when try to create the Intent….Jason Inbody
08/06/2021, 4:42 PMPardeep Sharma
08/07/2021, 3:15 AMjava.lang.RuntimeException: Unable to instantiate application com.sample.gitapp.BaseApplication: java.lang.ClassNotFoundException: Didn't find class "com.sample.gitapp.BaseApplication" on path: DexPathList[[zip file "/data/app/com.sample.gitapp-2/base.apk"],nativeLibraryDirectories=[/data/app/com.sample.gitapp-2/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]
Any idea on it?Tuan Kiet
08/07/2021, 11:46 AMdave08
08/08/2021, 11:08 AMVibhav Airan
08/08/2021, 1:38 PMgregory phiri
08/08/2021, 6:20 PMSudhir Singh Khanger
08/09/2021, 2:28 AMKshitij Patil
08/09/2021, 5:18 AMFlow
support in Room ? How many updates it could consistently reflect?
I have a fragment with recyclerview listening for realtime DB changes using Flow<List<T>>
for a select *
query and am performing ~10 writes/sec with REPLACE
strategy, in the background. This results in dropping out some records (if there are 2 records in the list being updated frequently, they get merged into one, while having different values for primary key)
I'm not sure what exactly is a bottleneck here because SQLITE can easily handle these many writes.Alexander
08/09/2021, 6:02 AMFlorian
08/09/2021, 9:32 AMAnyelo Vinzen
08/10/2021, 1:33 AMJason Inbody
08/10/2021, 1:46 AMbindService
doesn't work. Whats the kotlin equivalent?
private fun initiateNokeService() {
val nokeServiceIntent = Intent(this.user.context, NokeDeviceManagerService::class.java)
bindService(nokeServiceIntent, mServiceConnection, Context.BIND_AUTO_CREATE)
}
thats the function I'm trying to implement but can't seem to figure out how to bind the serviceSlackbot
08/10/2021, 12:32 PMSlackbot
08/10/2021, 9:55 PMHovhannes
08/11/2021, 11:42 AMVibhav Airan
08/11/2021, 12:48 PMMark
08/11/2021, 1:47 PMif
condition (at least 3 branches) where the checks are things like Build.VERSION.SDK_INT > 12
and then branch depends on such a later SDK level. How to suppress this warning?
Thread in Slack ConversationHovhannes
08/11/2021, 1:52 PMThe Monster
08/12/2021, 1:15 AMxml
<LinearLayout xmlns:android="<http://schemas.android.com/apk/res/android>"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/item_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>