You are currently browsing the tag archive for the ‘Deploying on Physical Device’ tag.

This is in continuation to the first two articles of Android Google Maps Api Ver 2.0.

The objective of this article is to test our Google Maps Api Ver 2.0 Application that we have developed so far in the first two parts of this series of articles on a Physical Device. We need a physical Android device. The one that I have is HTC One X.



Identifying which  Android USB drivers to use

Before we start to install the drivers we need to identify which drivers are we going to install.If we have an Android Developer Phone (ADP) like Nexus we will use the Google USB Drivers.  The latest Google USB Drivers can be downloaded using the following link. and help on how to install it . Only the Galaxy Nexus drivers are provided by Samsung and not Google. We can get the drivers for Galaxy Nexus from the following link. . If we have a device other then the above mentioned, we will use OEM Drivers. I own an HTC ONE X so in this article we will go the the OEM Drivers.

Installing the Android USB Drivers

Now that we have identified which device do we have and which drivers we will install. In my case I ll install the OEM drivers for HTC ONE X. The link shows a list of devices and their links from where their USB drivers can be downloaded. . So we will go to the HTC page and will click on support to get the drivers. HTC Sync Manager will do the job.  When the appropriate drivers are installed on the computer than  we will move to the next phase.

Setting up Eclipse for our Physical Device

Run Eclipse,  open the DDMS tab. If our emulator is running we will only see the emulator in DDMS. We wont see Physical Device in DDMS.

DDMS not showing the Physical Device

DDMS not showing the Physical Device

Enable the USB debugging from the device. Then in DDMS select the Devices Tab and click on the right most arrow to get the drop down menu , click on Rest adb.

Resetting the adb.

Resetting the adb.

When we Reset the adb, the DDMS will show our Physical Device in the Devices Tab. If not make sure that the device is properly connect to the computer with the USB connecting cable.  This is what you will see when everything goes fine.

DDMS showing our Physical Device in the Devices Tab.

DDMS showing our Physical Device in the Devices Tab.

Deploying our application on the Physical device.

Close all the Emulators, Make sure the Device is connected properly with the computer. In DDMS check in the Devices Tab if its still showing our Physical Device, if it is than its ok, if not then Reset adb as explained earlier. After having the Physical Device in the DDMS go to Run Configuration Screen from where we normally select the AVD or emulator to Run our application. The image below shows the screen.

Deploying our Applicaiton on device.

Deploying our Applicaiton on device.

In the Target Tab click on the dropdown menu, it has three options

  1. Active AVD’s/Active Devices
  2. Active AVD’s
  3. Active Devices

Select the 3rd option, “Active devices” Then Click Apply and Run. If the device is properly connected, and it appears in the DDMS, the system will automatically search for active devices. In our case HTC One X is the active device. The application will be directly deployed on our Device.  When we make some changes to the code, we can deploy the application directly to the device exactly the same way again, but its better to un install the last deployed application and then deploy a fresh copy of our application again on the device from Eclipse.

Note:- This article is not specific for deploying just Google maps applications on Physical Devices. Any application can be deployed on Physical Device using the steps in this article. Secondly , earlier it was not possible to run Android Google Maps APi ver 2.0 on AVD or emulator so we had to test the application on Physical Device. But now its not necessary , now we can test our Android Google Maps API Ver 2.0  applications on emulators or AVDs.

Thats all for now, I ll come up with testing and deployment on emulator soon


Blog Stats

  • 329,708 hits

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 233 other followers

%d bloggers like this: