I have been working in Android apps development for almost one and a half year. During these times, I got to learn about many things. How should we design and code any android app? What is needed for app development? How can I use third party libraries to increase performance?
We all know that Android is currently the largest mobile platform in the world. There are millions of applications available in the play store for almost any tasks. Learning Android app development is not that difficult task, anybody can make their own app for its own use or can publish on app markets. For those who are interested in Android development, I am writing a series of Android tutorials that might help you in learning Android development basics.
First, I will cover some basic tutorials for beginners. I will also try to write about some third party ready-made libraries which can help you to increase your application performance.
Alright! Lets start with requirements!
What do we need ?
- You must have JDK( Java Development Kit) installed
What is Android SDK?
Android Software Development Kit (SDK) is developed by Google to help developers integrate Android into their dev environment as well as facilitate more Android development. It contains the following things:
- Eclipse + ADT plugin
- Android SDK Tools
- Android Platform-tools
- The latest Android platform
- The latest Android system image for the emulator
You have everything that is required in this bundle. You just have to open Eclipse and start developing apps. For those who don’t know about Eclipse, its an IDE used for application development in many languages. Google has already configured for Android apps development by installing Android Developers Tools(ADT) plugin. So, You didn’t have to manually setup anything.
Setting up the SDK bundle
After downloading the latest Android SDK bundle, you just need to do these do things:
- Unpack the ZIP file (named
adt-bundle-<os_platform>.zip) and save it to an appropriate location, such as a “Development” directory in your home directory.
- Open the
adt-bundle-<os_platform>/eclipse/directory and launch eclipse.
Note: Don’t move any files inside the
adt-bundle-<os_platform> folder, this might lead to misconfiguration.
Next Step, Adding packages of different version of Android and Libraries
By adding and installing libraries of a particular version of Android, you are able to test your application on your emulator device. For installing SDK packages, you must follow these steps:
1. Launch Eclipse and Select your Workspace where the source code of your apps is saved. For example, my application projects will be saved in G:\MyAndroid
2. Click on Window -> Android SDK Manager from Eclipse menu bar. Then, SDK Manager is opened like this:
3. Within the Android SDK Manager, make sure that the check boxes next to the following packages are listed as Installed in the Status column:
- Tools > Android SDK Tools
- Tools > Android SDK Platform-tools
- Android 4.4 API 19 > Documentation for Android SDK(optional)
- Android 2.3.3 API 10 > SDK platform
- Android 2.3.3 API 10 > Intel x86 System image
- Android 2.3.3 API 10 > Google API (optional)
- Extras > Android Support Library
- Extras > Google USB Driver
4. Then, Click on Install packages button. Accept policies and install the packages.
5. After downloading packages, You are now able to create an emulator machine for testing android applications.
Next Step, Create an Android Emulator Machine
1. Click on Window -> Android Virtual Device Manager from Eclipse menu bar
2. Click on New to create an emulator machine.
3. Fill the following options as per your need:
AVD name : Your emulator machine name
Device : This option is for selecting the resolution of your emulator, its size basically.
Target: Select the Android API from the list of installed packages before. For example, In SDK Manager, I have checked the options for installing Android 2.3.3 API.
Memory Options: You can select the RAM for the emulator device
Internal Storage: size of internal storage
SD card : size for SD card
Tip: Keep the size of SD card as low as possible. Because if you select 1Gb or 2GB, the emulator will take longer time to boot. I guess 100 or 200mb is sufficient.
4. Your emulator is created. Select the emulator and click on Start to open the emulator.
You can use this emulator for testing applications. Using Emulator machine for testing apps is one option or you can also use your Android Smartphone for testing applications because emulator speed depends on your PC configuration and testing an application will be faster and viable option on Android phones.
Using Android Smartphone as Emulator
For enabling your Android Smartphones for testing applications, You just have to enable Developer options.
1. Go to Settings on your smartphone. Select Developer options from the list.
In some devices, Developer Options is not visible by default. You have to enable it. You can do this by going to About Phone options in Settings. Then, Tap on Build Number 5 times or 7 times to enable Developer options
2. In Developer options, check the USB debugging option to use your Smartphone device as emulator. You can now connect your Smartphone to your PC and start testing applications on your smartphone in case you don’t want use emulator.
You have now setup the Development Environment for Android apps. In the next tutorial, I will tell you How to create your first Android application. Stay Tuned! 🙂