Open pranavlathigara opened 5 years ago
Hi @pranavlathigara,
Thanks for reporting this issue. I'll have a look on that.
Regards, Piotr
@pranavlathigara Fix is simple: just use Boolean::class.javaObjectType
instead of Boolean::class.java
and you should be set.
ok let me try
I have getting error while fetching boolean value in kotlin
val isAutoStart : Boolean? = PrefInstance.get(context)?.get(Constants.PREF_SERVICE_IS_ALERT,Boolean::class.java ,false)
Error Log
java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String at android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:225) at com.github.pwittchen.prefser.library.Prefser.get(Prefser.java:266) at com.github.pwittchen.prefser.library.Prefser.get(Prefser.java:239)