android - How to string to shared preference without an editText? -


can save strings sharedpreference without using edittext. using edit text format of putting string shared preference right?

editor.putstring("username", etusername.gettext().tostring()); 

i want happen users id db saved on sharedpreference.

editor.putstring("userid", *******); 

what should put there? thanks. don't know how it.

and db users.

mydb

editor.putstring("userid", parameter); 

yes, in second parameter can save sting whatever want.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -