<How to convert my values String to custom type in...
# stackoverflow
u
How to convert my values String to custom type in kotlin? I have a android app i need to save value in sharedpreferences in android using kotlin. sample code below. my value is : AppdatabaseIMP@43b8de6 ------- its a Appdatabase type so i convert to string like this val APPDBSTR = appDatabase.toString() save: val pref = cc.getApplicationContext().getSharedPreferences("MyPrefdd", 0) val editor = pref.edit() editor.putString("APPDBSTR", APPDBSTR) editor.apply() get: val pref = context!!.getSharedPreferences("MyPrefdd", 0) val mFragAPPDBSTR =...