Monday 18 February 2013

Setting up your Android Mobile for Development

Here in this tuturial, i will guide you how to setup your android device for development. There after you will be able to comunicate with your mobile from Eclipse (or any other IDE). It will also enable you to debug your project directly on your mobile. 


There are five simple steps including,


1. Make your Application Debuggable

2. Enable USB debugging on your mobile device

3. Download & Install your device driver

4. Eclipse Deployment Target Selection Mode

5. Testing


Lets start,


1. Make your Application Debuggable

In the  AndroidManifest.xml file, add android:debuggable="true" to the <application> element.

Note: Be sure to remove this  before you build for release (your published application should usually not be debuggable).


2. Enable USB debugging on your mobile device.

Now you need to enable USB debugging on you mobile.
  • On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development.
  • On Android 4.0 and newer, it's in Settings > Developer options.
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


 3. Download & Install your device driver

If you have already installed your mobile driver just leave this step or if you have device driver with you install it on your computer. You can also download your device driver from internet. Below is the list of vendors and their official downlaod links.
OEMDriver URL
Acerhttp://www.acer.com/worldwide/support/mobile.html
alcatel one touchhttp://www.alcatel-mobilephones.com/global/Android-Downloads
Asushttp://support.asus.com/download/
Dellhttp://support.dell.com/support/downloads/index.aspx?c=us&cs=19&l=en&s=dhs&~ck=anavml
Foxconnhttp://drivers.cmcs.com.tw/
Fujitsuhttp://www.fmworld.net/product/phone/sp/android/develop/
Fujitsu Toshibahttp://www.fmworld.net/product/phone/sp/android/develop/
Garmin-Asushttps://www.garminasus.com/en_US/support/pcsync/
Hisensehttp://app.hismarttv.com/dss/resourcecontent.do?method=viewResourceDetail&resourceId=16&type=5
HTChttp://www.htc.com .
Huaweihttp://www.huaweidevice.com/worldwide/downloadCenter.do?method=index
Intelhttp://www.intel.com/software/android
KT Techhttp://www.kttech.co.kr/cscenter/download05.asp
Kyocerahttp://www.kyocera-wireless.com/support/phone_drivers.htm
Lenovohttp://developer.lenovomm.com/developer/download.jsp
LGEhttp://www.lg.com/us/mobile-phones/mobile-support/mobile-lg-mobile-phone-support.jsp
Motorolahttp://developer.motorola.com/docstools/USB_Drivers/
Pantechhttp://www.isky.co.kr/cs/software/software.sky?fromUrl=index
Pegatronhttp://www.pegatroncorp.com/download/New_Duke_PC_Driver_0705.zip 
Samsunghttp://www.samsung.com/us/support/downloads
Sharphttp://k-tai.sharp.co.jp/support/
SK Telesyshttp://www.sk-w.com/service/wDownload/wDownload.jsp
Sony Mobile Communicationshttp://developer.sonymobile.com/downloads/drivers/
Teleepochhttp://www.teleepoch.com/android.html
Yulong Coolpadhttp://www.yulong.com/product/product/product/downloadList.html#downListUL
ZTEhttp://support.zte.com.cn/support/news/NewsDetail.aspx?newsId=1000442

4. Deployment Target Selection Mode

By default android automaticaly choose preffered emulator (AVD) to launche/debug our application instead of your mobile device. So we need to know how to select our mobile device instead of emulator,

Right Click on your project> Run as > Select Run Configurations > select Target Tab 


Select Always prompt to pick device instead of automatically pick.


5. Testing


Here you go, run/debug your app in eclipse. Select your device from device list and press ok. 

Your Application will be launched on your phone & you will be able to debug and see the output on your android device.



Thats all for the moment, In comming days I will Post more related topics for Android Development. Rigt now setup you mobile and debug your first app on your device.


Looking forward for your feedback& comments, Thanks.





Sunday 17 February 2013

Content Assist (Ctrl + Space) Is Not Working in Eclipse

Some times after updating your Eclipse Content Assist(Ctrl+Space) does not work. Means eclipse provide no proposal. There may be one of below two reasons of this issue.


1. Content Assist Configuration

Configure Eclipse’s content assist, go  Preferences>Java>Editor>Content Assist>Advanced Make sure Java Proposals is ticked 


2. Used by Other Application

Check if Ctrl+Space hot key combination is not used by any other Application. If so change that.

Transparent background

While working on  android widgets, some time we want to use transperent background. For this purpose we can use either transparent images or transparent colors as background of the widget.

Transparent Color

android:background="#TTRRGGBB"" here RR, GG, BB are the (hex) red, green, blue components, and TT is the transparency component. Use TT = 80 (hex) for 50% transparency, FF for no transparency, 00 for fully transparent or use same in XML
<color name="transparent_red">#99FF0000</color>

Transparent Background Image

For this you have to create PNG-images with an alpha channel specified. That depends on which software you are using to create your bitmaps. You can use many programs like Illustrator or Photoshop.

Saturday 16 February 2013

Emulator problem in Android

In eclipse we face prolem that new emulator runs every time, and before our project starts we see a message on console that emulator disconnected. If you are facing this teasing problem here is the simple soloution.

Just go to Task Manager>Processand  Delete Adb.exe

Now again run your project, it will use existing emulator to show the output.
Check and share your feedback

How to Setup Android Development Environment

Like any other software Development, Android Development also needs some editor, tools, plugins etc. In this article we will discuss here how to prepare your system to start Android Development in four easy steps. 


1. Java Development Tool Kit

First step is to install JDK from Oracle Web Site as per given screen shot given below.


2. Android SDK


Secondly download SDK from Here , extract it to root diractory and rename extracted folder as Android.

Downloaded SDK contains
  •   IDE - Eclipse
  •   Android SDK Starter
  •   ADT for Eclipse (Provided by Google)
  •   Plate Form & Components
  •  SDK Manager
Make shortcut of eclipse application on your desktop. Upon first execution, eclipse will ask for workspace path. Give path of the folder where you want to save your Android Projects. Here you go, we have editor availale with us to start development.

3. Android Prefrences


In Eclipse go to Window>Prefernces and enter path of downloaded SDK.

Here list of APIs are given below. These APIs are downloaded and availale to use in our projects.

We will use any of these APIs as SDK Targets.

If you need any other API, you will use SDK Manager.




4. SDK Manager



Use SDK Manager either from Android folder from root diractory or from window menu in eclipse to install othe APIs when ever required.     



Thats all for the moment, In comming days I will Post, Making your first App in Android, but right now go & setup your android anvironment on your computer.


Looking forward for your feedback& comments, Thanks.