Thursday, February 7, 2013

Connecting a Windows Computer to the Android Device

In  the last blog I talked about Android App Development which was setting up the SDK to develop apps for your Android.  I am using Android version 4.2.1.

The goal in this blog is to have a connection from the SDK on the Windows computer to the Android device.  This will allow to install and run apps on the Android device. In my case it is the Nexus 10 tablet.  In order to accomplish this I used these steps:

  1. Connect the tablet (or Android device) to the computer with the USB cable.
  2. Install the ADB driver on the Windows computer.
  3. Enable USB debugging.
The instructions for steps 2 & 3 are found in other places in the bowels of the web.  I am not going to reinvent the wheel for these two steps but I will direct you where to find this information.

1.  So now, connect the tablet (or Android device) to the computer with the USB cable.  This step is pretty easy.

2. Follow the instructions on the youtube video on 

How to Install ADB Drivers for Google Devices [ Nexus 7 , Galaxy Nexus, Nexus S, Nexus 1 ... ] 

There is a lot of discussion on installing the drivers on the web but they don't seem to work.  This one does.  Please make a comment thanking sleepessninjas in taking the time and effort in creating this video.

3.  The next step is to Enable USB debugging.  This is a hidden menu item.  You can follow these instructions 

How To Access the Developer Options Menu and Enable USB Debugging on Android 4.2


Now you are ready for

Building Your First App


Tuesday, February 5, 2013

Setting Up for Android App Development



In December I bought a Nexus 10 tablet.  In the back of my mind I thought that I might learn Android App Development. 

I am working in a Windows 7 environment so  I need to download the corresponding SDK.

Note that this posting is not intended to be all inclusive in setting up the SDK but as a supplemental guide.

I went to the Android SDK | Adroid Developers web page.  I downloaded the ADT Bundle for Windows.  I created a directory called adt-bundle-windows-x86_64 and I unzipped all the contents in that folder.   It is imperative that you download the java development kit  (JDK) or the java run time environment (JRE).  I had the JDK already downloaded and now what I had to do was to make sure the IDE could find java files.  What you'll end up doing is to run the eclipse.exe in the eclipse folder.  Understand there was an interation of trial and error as well as research as to run how to bring up IDE.  The IDE was not finding the java.  There is a file in the eclipse directory called eclipse.ini that needed to be modified.

The contents of the file is below and the bolded text is what I added:
-vm
C:\Program Files\Java\jdk1.7.0_13\bin

-startup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813 -product com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize256M
-showsplash com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize 256m
--launcher.defaultActionopenFile
-vmargs -Dosgi.requiredJavaVersion=1.6
-Xms40m -Xmx768m
-Declipse.buildId=v21.0.1-543035


The -vm C:\Program Files\Java\jdk1.7.0_13\bin is the bin directory of my bin directory for the JDK.

After this change is made then executing the eclipse.exe should bring up the IDE.  


The next post will talk about Connecting a Windows Computer to the Android Device.