RESET YOUR PHONE OR TABLET
For versions before Android 4.0, press the Menu key from the Home screen and select Settings/Privacy/Factory data reset. You'll get a warning screen. Scroll toward the bottom and tap "Reset phone." If you also have an SD card in the phone (and don't want to use the data in your next phone), also make sure to check the box next to "Erase SD card."
For Android 4.0 or later, go to Settings and look for "Backup and reset." Tap that, and then, on the next screen, tap "Factory data reset." You'll get a warning screen along with a list of all the accounts you are currently signed into.