MAP524/DPS924 Lecture 2

From CDOT Wiki
Revision as of 13:49, 2 July 2015 by Andrew (talk | contribs)
Jump to: navigation, search

Developing on a real device

You don't need to get a special development device in order to do development work on it. Pretty much any phone or tablet can be used for regular application development, you just need to make sure it has the version of Android you need on it.

Configuring your device

To enable your phone/tablet to be used as a developement device follow these steps:

  • In the "Developer options" settings you need to enable "USB debugging" to allow you to connect to the device using ADB.
    • If you don't see developer options - they are hidden by default and getting them to show varies on different devices. On a Nexus you go to "About phone" and tap "Build number" seven times.
  • Then you also need to allow your phone to install the apps you build. Go to the "Security" settings and enable installing from "Unknown sources". This way you don't need to go through the trouble and expense of signing your application and publishing them on Google Play.

Note that for security reasons you shouldn't keep the USB debugging option turned on permanently. It's not easy to abuse but it can be done.

Configuring your system

If you have your own Linux system (not the ICT USB Stick) you'll have to allow your user to read and write directly to a USB device. To do this simply add this file to your /etc/udev/rules.d/ directory: 51-android.rules

If you don't do that you'll still be able to use your device, but you'll need to use it as the root user instead.