Friday, 7 August 2015

Top Android learning website for beginners


If you want to learn Android programming there are a lot of Android tutorials and other learning materials online. There are lots of beginner tutorials and tons of advanced tutorials from various sources. We at SitePoint also offer a new Android development tutorial every now and then.
When there is so much information and you are a beginner, it’s easy to get confused about where to start. To make it easy for you and with no illusions that this list of Android tutorials is the best or complete, here are 12 Android tutorials to start with.
Not all the tutorials and their content are strictly beginner beginner focussed. Some of them start out for beginners and then delve into more advanced topics. So if you can’t follow everything in every single tutorial, don’t get desperate or frustrated.
If you encounter a hurdle, just spend more time with the tutorial, reading it a couple of times if necessary. If you are still not on friendly terms with it, there is no drama – just move forward and revisit it later.

Building Your First App

Naturally, we start the list with a tutorial from Google, the creators of Android. The ‘Building Your First App‘ tutorial starts from the very beginning and it’s suitable for absolute beginners. If you have no programming knowledge whatsoever, don’t expect to be able to handle the tutorial but if you have some programming background, it’s easy.
The tutorial has several ‘Best Practice’ sections at the end. This is good because all the important content about the topic in one place and you just have to read it.
01 - Building Your First App

Android Development – Tutorial

The reason this tutorial is near the top is that it’s very up-to-date (based on Android 4.4, the latest Android version as of today).
This tutorial has more topics and information than the tutorial from Google, so if you are looking for an in-depth tutorial, this is one the.
02 - Android Development - Tutorial
It’s not an easy or quick tutorial. If you want to get the most from it, you will need quite a lot of time to read it from start to finish. It can be a great source if you need to consult a given topic in detail.

3. Video Tutorials Series

I find video tutorials less useful (except when they teach design, animation, or any other visual topic) but for many people they are the preferred way of learning. If you belong to this group, you will love this series of video tutorials.
03 - Android Video Tutorials
It’s a comprehensive series of video tutorials ranging from under 5 to 15 minutes in length. Similarly to the previous two tutorials, this series covers everything from absolute beginner level to advanced topics.

An Android Tutorial/Book

It might be old-school, but for me the best way to get a complete idea about something is by reading a book about it. In a book, everything is organized logically, pages are numbered and keep their layout and there is enough text to explain the and code/graphics. The first two tutorials in this list are book-like but if you want something more authentic you could print them. Even better, a pdf tutorial, like this one, is a much better option.
04 - PDF Tutorial
This is one more general tutorial that covers Android development from beginner level to advanced.

Game Development Series

If you have some knowledge about Android but you want to delve into games development, this series of video tutorials is a great start. The series starts with the very basics of Android (and Eclipse) but my personal feeling is that if you are a total stranger to Android, the journey will be too hard.
05 - Android Game Development Tutorial
From what I saw, the series mentions general Android as well, not only game development. If you don’t know Android basics, my advice is to first read some of the general Android tutorials and then move to specialized topics, such as game development.

Better User Interfaces with the Android Action Bar

After you have had enough of general Android tutorials, let’s move to tutorials for common tasks. For some of these topics you can find information in the general tutorials as well but if you want more detail, this is for you. The first tutorial is about how to build Better User Interfaces with the Android Action Bar.
06 - Action Bar
In this tutorial you will learn how to set up the action bar, how to add actions, how to split, hide, and overlay it, as well as how to add navigation. You will also learn about action bar interactivity, such as how to handle clicks on its items and to use action views.

Learning to Parse XML Data in Your Android App

While you could write Android applications that do not involve any data input, often you will need external data. In such cases you need to know how to handle this data. XML can help you a lot and this is why I’ve included a tutorial on how to Parse XML Data in Your Android App.
This tutorial leads you step by step in the world of XML parsing. It also helps you create a parser that will look like the one shown in the next screenshot.
07 - XML Parsing Tutorial
Some More Online Web Sites Are..
  1. www.javatpoint.com/android-tutorial
  2. developer.android.com/
  3. www.tutorialspoint.com/android/
  4. www.codelearn.org/android-tutorial
  5. www.vogella.com/tutorials/Android/article.html
  6. developer.android.com/ 
  7. www.tutorialspoint.com/android/
  8.  www.javatpoint.com/android-tutorial 
  9. www.codelearn.org/android-tutorial
  10.  www.vogella.com/tutorials/Android/article.html 
  11. www.raywenderlich.com/78574/android-tutorial-for-beginners-part-1
  12. www.coreservlets.com/android-tutorial/
  13.  www.mkyong.com/tutorials/android-tutorial/
  14.  www.sitepoint.com/12-android-tutorials-beginners/ programmerguru.com/android-tutorial/ www.edumobile.org/tutorials/android/
  15.  www.androidhive.info/

how to change android SDK and JDK in android studio

From Android Studio 1.0.1
Go to
  1. File -> project Structure into Project Structure
  2. Left -> SDK Location
  3. SDK location select Android SDK location (old version use Press +, add another sdk)



Configuring Gradle Builds

This section builds on the Build System Overview and Build and Running from Android Studio to show you how to use build variants based on product flavors and build types.

Build Configuration Basics


Android Studio projects contain a top-level build file and a build file for each module. The build files are called build.gradle, and they are plain text files that use Groovy syntax to configure the build with the elements provided by the Android plugin for Gradle. In most cases, you only need to edit the build files at the module level. For example, the build file for the app module in the BuildSystemExample project looks like this:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.0"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile project(":lib")
    compile 'com.android.support:appcompat-v7:19.0.1'
    compile fileTree(dir: 'libs', include: ['*.jar'])




How To install Drawable Importer:


Drawable add
Import Drawables
To adapt to all Android screen sizes and densities, each Android project contains the drawable folder. Any developer with experience of Android development knows that to support all the screen sizes you must import different drawables for each screen type. The Android Drawable Importer makes this job easier. It reduces the effort needed to import scaled images into the Android project. Android Drawable Importer adds an option to import drawables in different resolutions or scale a specified image to a defined resolution. This plugin speeds up every developer's work with drawables.

To install Drawable Importer:

Install Drawable Importer

Android Drawable Importer For creating drawable for all screen resolution


Vendor: Marc Prengemann
License: LICENSE
This plugin consists of four main features. You can access them by a right-click anywhere, but not on a file, inside an Android module under New. 

1. AndroidIcons Drawable Import 
You are able to select the asset, specify your color, change the target resource name and select all the resolutions you want to import. 
All the missing folders will be created automatically. If there are already drawables with the same name, you will be warned. 

2. Material Icons Drawable Import 
This feature offers basically the same like the AndroidIcons import. You are able to select the asset by category, specify the color, change the target resource name and select all the resolutions you want to import. 

3. Scaled Drawable 
Select at least one asset and specify the resolution of it. If you want to scale the to be imported image as well, you should select "other" and then fill out the "target resolution" and the "target width / height". Then you can specify all the resolutions, to which the drawable should be resized to. 
This works also with 9-Patch-Images. But take care: sometimes it's necessary to remove / add about one "pixel" in the 9-Patch-Editor. But just try it :) 

4. Multisource-Drawable 
Ever got a zip with drawables for your Android project by your designer with the following structure? 

root/ 
./drawable_ldpi.png 
./drawable_mdpi.png 
./drawable_hdpi.png 
./drawable_xhdpi.png 

No problem! Now you can just select for every resolution a different asset, specify one name for them, and the rest is done by the plugin. 

Hint: When you select an asset, you can also just drag a file from your finder / explorer to the text field and drop it there.
Downloads: 23107
Rating:
Participated in rating: 3
VersionCompatible buildsDate
0.2.1123.7230.01.2015Download
3 updates are hidden show all updates
Screenshot #14925
Screenshot #14931
Screenshot #14926
Screenshot #14922
Screenshot #14930

Supporting Multiple Screens


To simplify the way that you design your user interfaces for multiple screens, Android divides the range of actual screen sizes and densities into:
  • A set of four generalized sizessmallnormallarge, and xlarge
    Note: Beginning with Android 3.2 (API level 13), these size groups are deprecated in favor of a new technique for managing screen sizes based on the available screen width. If you're developing for Android 3.2 and greater, see Declaring Tablet Layouts for Android 3.2 for more information.
  • A set of six generalized densities:
    • ldpi (low) ~120dpi
    • mdpi (medium) ~160dpi
    • hdpi (high) ~240dpi
    • xhdpi (extra-high) ~320dpi
    • xxhdpi (extra-extra-high) ~480dpi
    • xxxhdpi (extra-extra-extra-high) ~640dpi
To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8:12:16 scaling ratiobetween the six generalized densities. For example, if you have a bitmap drawable that's 48x48 pixels for medium-density screens, all the different sizes should be:
  • 36x36 (0.75x) for low-density
  • 48x48 (1.0x baseline) for medium-density
  • 72x72 (1.5x) for high-density
  • 96x96 (2.0x) for extra-high-density
  • 180x180 (3.0x) for extra-extra-high-density
  • 192x192 (4.0x) for extra-extra-extra-high-density (launcher icon only; see note above)

How to import eclipse project in android studio

1.Update your Eclipse ADT Plugin (you must have version 22.0 or higher).
2.In Eclipse, select File > Export.
3.In the window that appears, open Android and select Generate Gradle build files.
4.Select the projects you want to export for Android Studio and click Finish.
Your selected projects remain in the same location but now contain a build.gradle file and are ready for Android Studio.
Import into Android Studio
1.In Android Studio, select File > Import Project.
2.Locate a project you exported from Eclipse, select the project's root directory and click OK.
3.Select Create project from existing sources and click Next.
4.Follow the walk-through to complete the import process.

Wednesday, 29 July 2015

Building Your First App

Welcome to Android application development!
This class teaches you how to build your first Android app. You’ll learn how to create an Android project and run a debuggable version of the app. You'll also learn some fundamentals of Android app design, including how to build a simple user interface and handle user input..
Hello Android Example
You need to follow the 3 steps mentioned above for creating the Hello android application.

1) Create the New Android project

For creating the new android project:

1) Select File > New > Project...
2) Select the android project and click next

3) Fill the Details in this dialog box and click finish

Now an android project have been created. You can explore the android project and see the simple program, it looks like this:

Main Activity :

package com.example.helloworld;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.support.v4.app.NavUtils;

public class MainActivity extends Activity {

   @Override
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
   }
   
   @Override
   public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.activity_main, menu);
      return true;
   }
}

Manifest.xml File :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="com.example.helloworld"
   android:versionCode="1"
   android:versionName="1.0" >
   
   <uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="22" />
   
   <application
       android:icon="@drawable/ic_launcher"
       android:label="@string/app_name"
       android:theme="@style/AppTheme" >
       
       <activity
          android:name=".MainActivity"
          android:label="@string/title_activity_main" >
       
          <intent-filter>
             <action android:name="android.intent.action.MAIN" />
             <category android:name="android.intent.category.LAUNCHER"/>
          </intent-filter>
       
       </activity>
       
   </application>
</manifest>
Run The Application:
To run the android application: Right click on your project > Run As.. > Android Application
The android emulator might take 2 or 3 minutes to boot. So please have patience. After booting the emulator, the eclipse plugin installs the application and launches the activity. You will see something like this:


Saturday, 21 February 2015

First Step To Learn Android

Hello everyone,

As you all know that Android is the very popular operating system and used by most of the people in the world.If you want to be Software developer then it's a good time to learn Android Technology.

To learn Android,you need a very basic understanding of JAVA language.JAVA is a open source and platform independent language.Open source means all the development tool (JDK Java Development tool) are freely available for each operating system like Windows,linex,MAC etc.

Before staring learning JAVA you need  understanding of  programming logic's from c and c++ language.



Android is a Operating System based on linex carnal for handheld devices like Smart Phone.Today many mobile company uses Android Operating System in there Mobile devices.Currently most of the company launches there smart phone based on Android Operating System.

For Developer Point of View

Android is open source,we uses Java language for application development.To become a Android application developer you need a basic knowledge of core java like 
  1. All Opps concept :Polymorphism ,Inheritance,Encapsulation,Object,Class.
  2. Thread
  3. Synchronization
  4. Interface
  5. String
  6. Data Types
  7. Collections
Development Environment :


 You will be glad to know that you can start your Android application development on either of the following operating systems:
  • Microsoft Windows XP or later version.
  • Mac OS X 10.5.8 or later version with Intel chip.
  • Linux including GNU C Library 2.7 or later.
Second point is that all the required tools to develop Android applications are freely available and can be downloaded from the Web. Following is the list of software's you will need before you start your Android application programming.
  • Java JDK5 or JDK6
  • Android SDK
  • Eclipse IDE for Java Developers (optional)
  • Android Development Tools (ADT) Eclipse Plugin (optional)

Step1 - Setup Java Development Kit (JDK) :


You can download the latest version of Java JDK from Oracle's Java site: Java SE Downloads.To set java path you go to following options...

Start->Control Panel->Performance and Maintenance->System->Advance->Environment Variable 

  1. Now Click on new
  2. Set Variable name as PATH
  3. Set Variable value as you JDK Path followed by bin directory
  4. Now click on Ok option.

Now create another Environment Variable :
  1. Now Click on new
  2. Set Variable name as JAVA_HOME
  3. Set Variable value as your JDK Path.
  4. Now click on Ok option.
If you are running Windows and installed the JDK in C:\jdk1.6.0_15, you would have to put the following line in your C:\autoexec.bat file OR follow upper steps..

set PATH=C:\jdk1.6.0_15\bin;%PATH%
set JAVA_HOME=C:\jdk1.6.0_15

On Linux, if the SDK is installed in /usr/local/jdk1.6.0_15 and you use the C shell, you would put the following code into your .cshrc file.

setenv PATH /usr/local/jdk1.6.0_15/bin:$PATH
setenv JAVA_HOME /usr/local/jdk1.6.0_15


Check your System Java path is set or Not :
  1. Go to command Prompt by CMD
  2. Type JAVAC and Press Enter :if you see message "JAVAC is not an internal OR external command" means you java path is not set.
  3. If this messages are appear means your java path is set successfully.
  4.  

Step 2 - Setup Android SDK :

You can download the latest version of Android SDK from Android official website : Android SDK Downloads

Step 3 - Setup Eclipse IDE :

To install Eclipse IDE, download the latest Eclipse binaries from http://www.eclipse.org/downloads/
After download compete unzip the file and copy it to any where you want in your system.

Eclipse can be started by executing the following commands on windows machine, or you can simply double click on eclipse.exe or right click on eclipse.exe and create an Shortcut on desktop for easy of use.



Step 3 - Create Android Virtual  Device :

To test your Android applications you will need a virtual Android device. So before we start writing our code, let us create an Android virtual device. Launch Android AVD Manager using Eclipse menu options Window > AVD Manager> which will launch Android AVD Manager. Use New button to create a new Android Virtual Device and enter the following information, before clicking Create AVD button.