Monday, January 13, 2014

Installing Android applications on Samsung device

In this post, I am going to talk about how to install your application into your Android device, and see it in real action. In this example, I used Eclipse IDE, Samsung S4, and Windows 7 OS.
To install your Android application on your Android device, other than Emulator, you need to configure your device and eclipse IDE.

      1.   Enable USB Debugging in your device, go to Settings > Developer options, and enable USB debugging.

Note: On Android 4.2 and newer Developer options is hidden by default. To make it available. go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.

2.   Configure your system to detect your device. On windows, you need to install the USB driver for adb.

Note: If you are developing on other OS than windows, please refer to the following link

     3.       Make sure that your previous changes took effect; restart your adb server.
-          Open cmd and navigate to your sdk installation directory.
-          Cd platform-tools directory.
-          Execute this command: adb kill-server.
-          Then execute: adb start-server.

4.       Back to your application on eclipse. Right click the application and choose Run > Run Configurations

     5.   From the run configuration screen, choose the first Option; Always prompt to pick device. As shown in the following figure. Click Run.

     6.   Device Chooser screen will be displayed, displaying all the available devices for you. Choose the first option, assuming that you completed the above listed points, and your device is detected on your computer. Click OK.

    7.   You can see the console log in Eclipse informing you that your installation to Android device was successful.

    8.   Now, open your mobile applications, you can see your new HelloWorld Application installed in your applications list.

     9.   Click on your application, to open it.

Congratulations, you have installed your application in your device, if you have any notes or questions; please drop me a comment bellow.