Refactor state to enum.
Working through bluetooth example from android programming book.