Subscribe:

Ads 468x60px

dropdown

Social Icons

Android Development Tools: - How to built a Android App ........


 Android SDK


The Android Software Development Kit (SDK) contains the necessary tools to create, compile and package Android application. Most of these tools are command line based.
The Android SDK also provides an Android device emulator, so that Android applications can be tested without a real Android phone. You can create Android virtual devices (AVD) via the Android SDK, which run in this emulator.
The Android SDK contains the Android debug bridge (adb) tool which allows to connect to an virtual or real Android device.


Android Development Tools


Google provides the Android Development Tools (ADT) to develop Android applications with Eclipse. ADT is a set of components (plug-ins) which extend the Eclipse IDE with Android development capabilities.
ADT contains all required functionalities to create, compile, debug and deploy Android applications from the Eclipse IDE. ADT also allows to create and start AVDs.
The Android Development Tools (ADT) provides specialized editors for resources files, e.g. layout files. These editors allow to switch between the XML representation of the file and a richer user interface via tabs on the bottom of the editor.


Dalvik Virtual Machine


The Android system uses a special virtual machine, i.e. the Dalvik Virtual Machine to run Java based applications. Dalvik uses an own bytecode format which is different from Java bytecode.
Therefore you cannot directly run Java class files on Android, they need to get converted in the Dalvik bytecode format.


How to develop Android Applications


Android applications are primarily written in the Java programming language. The Java source files are converted to Java class files by the Java compiler.
The Android SDK contains a tool called dx which converts Java class files into a .dex (Dalvik Executable) file. All class files of one application are placed in one compressed .dex file. During this conversion process redundant information in the class files are optimized in the .dex file. For example if the same String is found in different class files, the .dex file contains only once reference of this String.
These dex files are therefore much smaller in size than the corresponding class files.
The .dex file and the resources of an Android project, e.g. the images and XML files, are packed into an .apk (Android Package) file. The program aapt (Android Asset Packaging Tool) performs this packaging.
The resulting .apk file contains all necessary data to run the Android application and can be deployed to an Android device via the adb tool.
The Android Development Tools (ADT) performs these steps transparently to the user.
If you use the ADT tooling you press a button the whole Android application (.apk file) will be created and deployed.


Resource editors


The ADT allows the developer to define certain artifacts, e.g. Strings and layout files, in two ways: via a rich editor, and directly via XML. This is done via multi-page editors in Eclipse. In these editors you can switch between both representations by clicking on the tab on the lower part of the screen.
For example if you open the res/layout/main.xml file in the Package Explorer View of Eclipse, you can switch between the two representations as depicted in the following screenshot.




What is Android? - Question of the Era ........


1.1. Android Operation System


Android is an operating system based on Linux with a Java programming interface.
The Android Software Development Kit (Android SDK) provides all necessary tools to develop Android applications. This includes a compiler, debugger and a device emulator, as well as its own virtual machine to run Android programs.
Android is currently primarily developed by Google.
Android allows background processing, provides a rich user interface library, supports 2-D and 3-D graphics using the OpenGL libraries, access to the file system and provides an embedded SQLite database.
Android applications consist of different components and can re-use components of other applications. This leads to the concept of a task in Android; an application can re-use other Android components to archive a task. For example you can trigger from your application another application which has itself registered with the Android system to handle photos. In this other application you select a photo and return to your application to use the selected photo.

Android is the newest mobile device operating system, we will be able to confidently create your own mobile device programs after learning android. Android applications are developed in Java and run on the Linux 2.6 kernel.

                                              

Open Handset Alliance and Android


The Open Handset Alliance is a group of hardware and software developers, including Google, NTT DoCoMo,
Sprint Nextel, and HTC, whose goal is to create a more open cell phone environment.
The first product to be released under the alliance is the mobile device operating
system, Android.
With the release of Android, Google made available a host of development tools
and tutorials to aid would-be developers onto the new system. Help files, the platform
software development kit (SDK), and even a developers’ community can be found at
Google’s Android website, http://code.google.com/android. This site should be your
starting point, and I highly encourage you to visit the site.
hardware platforms have been announced for Android to run on. HTC, LG
Electronics, Motorola, and Samsung are members of the Open Handset Alliance, under
which Android has been released, so we can only hope that they have plans for a few
Android-based devices in the near future. With its release in November 2007, the system
itself is still in a software-only beta.

Introduction to Android
Android, as a system, is a Java-based operating system that runs on the Linux 2.6 kernel.
The system is very lightweight and full featured. Figure 1-1 shows the unmodified
Android home screen.

Figure



Android applications are developed using Java and can be ported rather easily to the
new platform.


1.2. Google Play (Android Market)


Google offers the Google Play service in which programmers can offer their Android application to Android users. Google phones include the Google Play application which allows to install applications.
Google Play also offers an update service, e.g. if a programmer uploads a new version of his application to Google Play, this service will notify existing users that an update is available and allow to install it.
Google Play used to be called Android Market.


1.3. Security and permissions

During deployment on an Android device, the Android system will create a unique user and group ID for every Android application. Each application file is private to this generated user, e.g. other applications cannot access these files.
In addition each Android application will be started in its own process.
Therefore by means of the underlying Linux operating system, every Android application is isolated from other running applications.
If data should be shared, the application must do this explicitly, e.g. via a service or a ContentProvider.
Android also contains a permission system. Android predefines permissions for certain tasks but every application can define additional permissions.
An Android application declare its required permissions in its AndroidManifest.xml configuration file. For example an application may declare that it requires access to the Internet.
Permissions have different levels. Some permissions are automatically granted by the Android system, some are automatically rejected.
In most cases the requested permissions will be presented to the user before installation of the application. The user needs to decide if these permissions are given to the application.
If the user denies a permission required by the application, this application cannot be installed. The check of the permission is only performed during installation, permissions cannot be denied or granted after the installation.

Not all users pay attention to the required permissions during installation. But some users do and they write negative reviews on Google Play.

demo


1. What is Android?
1.1. Android Operation System
Android is an operating system based on Linux with a Java programming interface.
The Android Software Development Kit (Android SDK) provides all necessary tools to develop Android applications. This includes a compiler, debugger and a device emulator, as well as its own virtual machine to run Android programs.
Android is currently primarily developed by Google.
Android allows background processing, provides a rich user interface library, supports 2-D and 3-D graphics using the OpenGL libraries, access to the file system and provides an embedded SQLite database.
Android applications consist of different components and can re-use components of other applications. This leads to the concept of a task in Android; an application can re-use other Android components to archive a task. For example you can trigger from your application another application which has itself registered with the Android system to handle photos. In this other application you select a photo and return to your application to use the selected photo.

Android is the newest mobile device operating system, we will be able to confidently create your own mobile device programs after learning android. Android applications are developed in Java and run on the Linux 2.6 kernel.

JavaScript- Development tools




JavaScript Development Tools:

One of JavaScript's strengths is that expensive development tools are not usually required. You can start with a simple text editor such as Notepad.
Since it is an interpreted language inside the context of a web browser, you don't even need to buy a compiler.
To make our life simpler, various vendors have come up with very nice JavaScript editing tools. Few of them are listed here:

·   Microsoft FrontPage: Microsoft has developed a popular HTML editor called FrontPage. FrontPage also provides web developers with a number of JavaScript tools to assist in the creation of an interactive web site.
·         Macromedia Dreamweaver MX: Macromedia Dreamweaver MX is a very popular HTML and JavaScript editor in the professional web development crowd. It provides several handy prebuilt JavaScript components, integrates well with databases, and conforms to new standards such as XHTML and XML.
·         Macromedia HomeSite 5: This provided a well-liked HTML and JavaScript editor, which will manage their personal web site just fine.


Java Script

A JavaScript consists of JavaScript statements that are placed within the <script>... </script> HTML tags in a web page.
You can place the <script> tag containing your JavaScript anywhere within you web page but it is preferred way to keep it within the <head> tags.
The <script> tag alert the browser program to begin interpreting all the text between these tags as a script. So simple syntax of your 

JavaScript will be as follows

<script ...>
  JavaScript code
</script>

The script tag takes two important attributes:

·         language: This attribute specifies what scripting language you are using. Typically, its value will be javascript
·         type: This attribute is what is now recommended to indicate the scripting language in use and its value should be set to "text/javascript".

So your JavaScript segment will look like:

<script language="javascript" type="text/javascript">
  JavaScript code
</script>

 

Your First JavaScript Script:

Let us write our class example to print out "Hello World".

<html>
<body>
<script language="javascript" type="text/javascript">
<!--
   document.write("Hello World!")
//-->
</script>
</body>
</html>

We added an optional HTML comment that surrounds our Javascript code. This is to save our code from a browser that does not support Javascript. The comment ends with a "//-->". Here "//" signifies a comment in Javascript, so we add that to prevent a browser from reading the end of the HTML comment in as a piece of Javascript code.

Next, we call a function document.write which writes a string into our HTML document. This function can be used to write text, HTML, or both. So above code will display following result:

Hello World!
.
Whitespace and Line Breaks:

JavaScript ignores spaces, tabs, and newlines that appear in JavaScript programs.
Because you can use spaces, tabs, and newlines freely in your program so you are free to format and indent your programs in a neat and consistent way that makes the code easy to read and understand.

Semicolons are Optional:

Simple statements in JavaScript are generally followed by a semicolon character, just as they are in C, C++, and Java. JavaScript, however, allows you to omit this semicolon if your statements are each placed on a separate line. For example, the following code could be written without semicolons

<script language="javascript" type="text/javascript">
<!--
  var1 = 10
  var2 = 20
//-->
</script>

But when formatted in a single line as follows, the semicolons are required:

<script language="javascript" type="text/javascript">
<!--
  var1 = 10; var2 = 20;
//-->
</script>

NOTE: It is a good programming practice to use semicolons
.
Case Sensitivity:

JavaScript is a case-sensitive language. This means that language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters.
So identifiers Time, TIme and TIME will have different meanings in JavaScript.

NOTE: Care should be taken while writing your variable and function names in JavaScript.

Comments in JavaScript:

JavaScript supports both C-style and C++-style comments, Thus:
·         Any text between a // and the end of a line is treated as a comment and is ignored by JavaScript.
·         Any text between the characters /* and */ is treated as a comment. This may span multiple lines.
·         JavaScript also recognizes the HTML comment opening sequence <!--. JavaScript treats this as a single-line comment, just as it does the // comment.
·         The HTML comment closing sequence --> is not recognized by JavaScript so it should be written as //-->.

Example:

<script language="javascript" type="text/javascript">
<!--
 
// This is a comment. It is similar to comments in C++
 
/*
 * This is a multiline comment in JavaScript
 * It is very similar to comments in C Programming
 */
//-->
</script>



JavaScript: Introduction - Complete JavaScript tutorials for Blogger, Wordpress, Joomla, etc.




What is JavaScript ?    

JavaScript started life as LiveScript, but Netscape changed the name, possibly because of the excitement being generated by Java.to JavaScript. JavaScript made its first appearance in Netscape 2.0 in 1995 with a name LiveScript.
JavaScript is a lightweight, interpreted programming language with object-oriented capabilities that allows you to build interactivity into otherwise static HTML pages.
The general-purpose core of the language has been embedded in Netscape, Internet Explorer, and other web browsers
JavaScript is:
  • JavaScript is a lightweight, interpreted programming language
  • Designed for creating network-centric applications
  • Complementary to and integrated with Java
  • Complementary to and integrated with HTML
  • Open and cross-platform


Client-side JavaScript:                                      

Client-side JavaScript is the most common form of the language. The script should be included in or referenced by an HTML document for the code to be interpreted by the browser.
It means that a web page need no longer be static HTML, but can include programs that interact with the user, control the browser, and dynamically create HTML content.
The JavaScript client-side mechanism features many advantages over traditional CGI server-side scripts. For example, you might use JavaScript to check if the user has entered a valid e-mail address in a form field.
The JavaScript code is executed when the user submits the form, and only if all the entries are valid they would be submitted to the Web Server.
JavaScript can be used to trap user-initiated events such as button clicks, link navigation, and other actions that the user explicitly or implicitly initiates.

Advantages of JavaScript:                                

The merits of using JavaScript are:

· Less server interaction: You can validate user input before sending the page off to the server. This saves server traffic, 
    which means less load on your server.

· Immediate feedback to the visitors: They don't have to wait for a page reload to see if they have forgotten to enter something.

· Increased interactivity: You can create interfaces that react when the user hovers over them with a mouse or activates them via the keyboard.

· Richer interfaces: You can use JavaScript to include such items as drag-and-drop components and sliders to give a Rich Interface to your site visitors.


Limitations with JavaScript:                                

We can not treat JavaScript as a full fledged programming language. It lacks the following important features:

· Client-side JavaScript does not allow the reading or writing of files. This has been kept for security reason.

· JavaScript can not be used for Networking applications because there is no such support available.

· JavaScript doesn't have any multi-threading or multi-process capabilities.

Once again, JavaScript is a lightweight, interpreted programming language that allows you to build interactivity into otherwise static HTML pages.





Meta Tag: Introduction - Easiest way to get known to search engine ....

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

META TAG: INTRODUCTION

Meta tag are used to store information usually relevant to browsers and search engines. Some search engines on WWW will use the name and content attributes of the meta tag to index your pages.

Meta tag are used to specify author, page description, keywords, last modified details and other useful meta data.

To apply Meta Tag on your website, is to make your website world wide. Search engines through meta tag, easily identifies, the topics with which your sites dealt and they will automatically redirect a user to your website if the data required by the user is present in your site.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Cell spacing (control the distance between cells) - GREAT HTML TABLES

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CODE:



<h4>Without cellspacing:</h4>
<table border="1">
<tr>
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr>
</table>

<h4>With cellspacing="0":</h4>
<table border="1" cellspacing="0">
<tr>
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr>
</table>

<h4>With cellspacing="10":</h4>
<table border="1" cellspacing="10">
<tr>
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr>

</table>


GO BACK: HTML TABLES

Cell padding (control the white space between cell content and the borders) - GREAT HTML TABLES

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CODE:



<h4>Without cell padding:</h4>
<table border="1">
<tr>
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr>
</table>

<h4>With cell padding:</h4>
<table border="1"
cellpadding="10">
<tr>
<td>First</td>
<td>Row</td>
</tr>
<tr>
<td>Second</td>
<td>Row</td>
</tr>

</table>


GO BACK: HTML TABLES

Tag inside a Table - GREAT HTML TABLES

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CODE:



<table border="1">
<tr>
<td>
<p>This is a paragraph</p>
<p>This is another paragraph</p>
</td>
<td>This cell contains a table:
<table border="1">
<tr>
<td>A</td>
<td>B</td>
</tr>
<tr>
<td>C</td>
<td>D</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>This cell contains a list
<ul>
<li>apples</li>
<li>bananas</li>
<li>pineapples</li>
</ul>
</td>
<td>HELLO</td>
</tr>

</table>


GO BACK: HTML TABLES

Table Cells than span more than row/column - GREAT HTML TABLES

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CODE:



<h4>Cell that spans two columns:</h4>
<table border="1">
<tr>
<th>Name</th>
<thcolspan="2">Telephone</th>
</tr>
<tr>
<td>Bill Gates</td>
<td>555 77 854</td>
<td>555 77 855</td>
</tr>
</table>

<h4>Cell that spans two rows:</h4>
<table border="1">
<tr>
<th>First Name:</th>
<td>Bill Gates</td>
</tr>
<tr>
<throwspan="2">Telephone:</th>
<td>555 77 854</td>
</tr>
<tr>
<td>555 77 855</td>
</tr>

</table>


GO BACK: HTML TABLES