Ahmed Adel
09/30/2018, 9:53 PMshrawan
10/01/2018, 3:04 PMCarlos Ottoboni
10/01/2018, 8:16 PMEntity
with a Enum
class as a property. It's something like this:
@Entity(tableName = "tb_episode")
data class Episode (
var title: String,
var episodeType: EpisodeType
...
)
And I have the TypeConverter
for it:
object Converters {
@TypeConverter
@JvmStatic
fun toEnum(code: Int): EpisodeType {
return when (code) {
1 -> EpisodeType.PODCAST
2 -> EpisodeType.ALBUM_REVIEW
else -> EpisodeType.DEFAULT
}
}
@TypeConverter
@JvmStatic
fun fromEnum(type: EpisodeType): Int {
return when (type) {
EpisodeType.PODCAST -> 1
EpisodeType.ALBUM_REVIEW -> 2
else -> 0
}
}
}
Also, I added the TypeConverters
Annotation to my Database class:
@TypeConverters(Converters::class)
abstract class AppDatabase : RoomDatabase()
But when I try to run the App I get this message:
Class is referenced as a converter but it does not have any converter methods.
I don't know if Room doesn't support Kotlin Enum
class or if I'm doing something wrong.
Anyone can help me with this?AzMoo
10/02/2018, 12:19 AMneuber
10/02/2018, 3:41 AMSlackbot
10/02/2018, 3:41 AMDedy Kurniawan
10/02/2018, 4:40 AMCamilleBC
10/02/2018, 8:50 AMCamilleBC
10/02/2018, 1:06 PMSam
10/02/2018, 3:02 PMmatt tighe
10/03/2018, 4:51 PMneuber
10/03/2018, 7:22 PMSam
10/04/2018, 9:14 PMoverride fun onRestoreInstanceState(savedInstanceState: Bundle?) {
super.onRestoreInstanceState(savedInstanceState)
}
Jason
10/05/2018, 9:03 AMPratham
10/06/2018, 4:42 AMEugen Martynov
10/07/2018, 11:00 AMtyler
10/07/2018, 11:20 PMMarkchous
10/08/2018, 2:56 PMBroadcastReceiver
when trying to set a permission. So I set the permission in the sending app in the manifest using <uses-permission.... />
and then include that permission in the sendBroadcast(intent, permission)
call. And in the receiving app I have the permission set in the manifest where I am declaring the receiver. But my BroadcastReceiver
won't accept the broadcast. The interesting thing is that as soon as I remove the permission from both apps, my broadcast works perfectly. Any ideas?
Edit: Fixed. It was due to the app signature.oday
10/09/2018, 7:55 AMpaulex
10/09/2018, 12:08 PMadev_one
10/09/2018, 3:10 PMUnsupported reference to synthetic extension property for a Java get/set method
. Is there way to fix it without creating extension property for each get/set? Or may be any ideas about another clear syntax to bind view property with reactive property?jurajsolarml
10/09/2018, 4:09 PMjaydeepc52
10/10/2018, 9:33 AMrkeazor
10/10/2018, 12:18 PMlawlorslaw
10/10/2018, 11:52 PMlateinit var
to know when its been initializedlawlorslaw
10/11/2018, 6:27 AMluke_c
10/11/2018, 12:19 PMluke_c
10/11/2018, 12:21 PManpham6
10/11/2018, 5:15 PMlocke
10/11/2018, 7:39 PMDataBinding
library to not recognize DataBindingComponent
? StackOverflow is referencing the transition from AS 3.0 to 3.1, but I'm using 3.2 and am not really sure what's going on. Build tools version 3.2.0 if it's relevant.