If you're putting your Android phone or tablet up for sale on eBay, then a factory reset might not be enough to destroy all of the data on it. On some devices, the files and photos on your phone aren't actually erased — just the references and file structure around them. With a few hacking tools, anyone can scrape some of your data off.
You can prevent that by taking one extra step before your factory reset: encrypt all the data on your device. This means even if someone else gets at your files after the factory reset, they won't be able to make sense of them. The encryption option is under Settings and Security on stock Android and will be in a similar location on the different variants of the OS.
Encrypting your phone or tablet can take an hour or more, so be patient — it's worth it for the extra piece of mind. Make sure you make a note of the PIN you create (which is separate from the lock screen PIN) should you need to get back into your file system. Ideally, do this as a last step before selecting Factory data reset from the Backup & reset screen.
Once you're done, you can stick your device on eBay knowing that whatever data is left is much better protected than it would be with a factory reset alone. Hardware encryption is built into iOS devices, so if you're an iPhone or iPad owner than you can be smug in the knowledge that this extra step isn't required. For more background on Android encryption and some useful extra tips for selling your device safely, check out this in-depth post on Lifehacker.