So I am writing this post mostly to help people get up to speed who like myself, had never programmed Android before and need to set up their Nexus 7 device.
Through a simple google search you probably end up at the Using Hardware Devices page on the Android site. The instructions here are pretty straight forward but I wanted to include a few gotchas in my guide.
- Make your application debuggable by adding
<application>element in the
AndroidManifest.xmlfile. If you are using Eclipse you can skip this step.
- On your Nexus 7 open the
Settingsmenu and scroll down to
About tablet. Once you are in that menu if you scroll down to the bottom you will see a row which says
Build number. Tap
Build number7 times and you will unlock
- Now that
Developer optionshave been unlocked (this can be found in the
Settings), you can navigate to that menu.
USB debuggingto true. I also set
Stay awaketo true although you don’t need this.
- This next step is where I ran into a wall. Go to
Settings->Storage. On this menu there is a small button in the top right consisting of three small squares. Click this and then click
USB computer connection. You must select
Camera (PTP). I could not connect to the tablet when it was in
Media device (NTP)mode.
- Now that this is all finished you need to install a driver for your Nexus 7. In my case I wasn’t sure whether I needed the Google drivers or the Asus drivers. The answer is the latter which can be found at the Asus support site.
- Finally install the driver. Follow the directions here.
After all that I could test the “Hello World” app on my tablet. Now on to actually programming my app…