spinner read from database when the phone is not connecting to internet.