In my activity I have sharedReview.setPhoneNumberofUserFromDB(obj.getString("username"));
It sets the value to a string
from my DB
and then I get that value in my adapter
for use in my recyclerView
, which is working ok.
In my activity how can I convert sharedReview.setPhoneNumberofUserFromDB(obj.getString("username"));
to a string?
I've tried the below but it doesn't work:
String userNameAsString= String.valueOf(sharedReview.setPhoneNumberofUserFromDB(obj.getString("username")));
and
String phoneNoonPhone = (sharedReview.setPhoneNumberofUserFromDB(obj.getString("username")).toString());
It tells me the method toString can't be resolved
and Cannot resolve method valueOf(void);