RSS

Search Engine

Wednesday, December 29, 2010

Skyfire 3.0.1 for Android released Watch it

skyfire

Skyfire, the popular mobile browser for Google’s Android, has announced the release of latest version 3.0.1 for Android that brings new features and several bug fixes.

Features

  • Supports SD memory card slot that enable users to move the app to SD card to save some memory. This feature can be located in “Manage Applications” under “Settings”.
  • Better Crash reporting by sending anonymous logs for bugs causing the crash and Android Developer are hoping that more bugs will be fixed in the future.
  • Improved Download workflow for faster downloading of files hidden in the background and after its finished, a notification will pop up in the system tray for downloads
  • Upload files from within the web browser
  • Requirement: Android 2.2 (Froyo) or higher

Skyfire 3.0.1 for Android can be downloaded by scanning the QR code below to get the download link.

QRcode

Download Skyfire 3.0.1 for Android

Monday, December 27, 2010

Working With Images In Android From Basic Application

Simply Displaying An Image


The ImageView layout component is the base element used for displaying images in Android. Download Any image and copy it into res/layout/drawable-mdpi in your project.

main.xml

<ImageView

android:id="@+id/images"

android:src="@drawable/image"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

/>


This ImageView loads the any downloaded image you downloaded. Add this to the res/layout/main.xml file below the TextView.

And JAVA Code given below.


package com.tuto.image;


import android.app.Activity;


public class Images Activity {

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

ImageView image = (ImageView) findViewById(R.id.images);

}

}


All that was added to the default code is how to get the ImageView component from the layout and store it in a variable. We'll do more with this in the next examples.

So this are the simple imageview for displaying in android.

Saturday, December 25, 2010

Send email with attached file in Android

Hello Friends,

Today i have discussed about how to send email with attached file in android.

In android u have to give internet permission for android manifest file.

And this application work only from device not in android emulator... so this think is very important... And Please Refer this Android Application Website.

And source code given below.

main.xml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout android:id="@+id/LinearLayout01"

android:layout_width="fill_parent" android:layout_height="fill_parent"

xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="vertical">

<LinearLayout android:id="@+id/LinearLayout02"

android:layout_width="wrap_content" android:layout_height="wrap_content"

android:orientation="horizontal">

<EditText android:layout_width="wrap_content"

android:layout_height="wrap_content" android:width="170dip"

android:id="@+id/emailaddress"></EditText>

<TextView android:layout_width="wrap_content"

android:layout_height="wrap_content" android:id="@+id/emailaddress"

android:text="Email address"></TextView>

</LinearLayout>

<LinearLayout android:id="@+id/LinearLayout03"

android:layout_width="wrap_content" android:layout_height="wrap_content"

android:orientation="horizontal">

<EditText android:layout_width="wrap_content"

android:layout_height="wrap_content" android:width="170dip"

android:id="@+id/emailsubject"></EditText>

<TextView android:layout_width="wrap_content"

android:layout_height="wrap_content" android:id="@+id/emailsubject"

android:text="Subject"></TextView>

</LinearLayout>

<EditText android:layout_width="wrap_content"

android:layout_height="wrap_content" android:lines="5" android:width="300dip"

android:id="@+id/emailtext"></EditText>



<Button android:layout_width="wrap_content"

android:layout_height="wrap_content" android:id="@+id/emailsendbutton"

android:text="Send!" android:width="150dip"></Button>



</LinearLayout>



And java file given also below.

Email.java

package com.fb

import java.io.file;

import android.app.Activity;

import android.net.Uri;

import android.os.Bundle;

import android.app.Activity;

import android.content.Intent;

import android.os.Bundle;

import android.view.View;

import android.view.View.OnClickListener;

import android.widget.Button;

import android.widget.EditText;

public class Email Activity {

Button send;

EditText address, subject, emailtext;

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

send = (Button) findViewById(R.id.emailsendbutton);

address = (EditText) findViewById(R.id.emailaddress);

subject = (EditText) findViewById(R.id.emailsubject);

emailtext = (EditText) findViewById(R.id.emailtext);

send.setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

// TODO Auto-generated method stub

final Intent emailIntent = new Intent(

android.content.Intent.ACTION_SEND);

emailIntent.setType("image/png");

emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,

new String[] { address.getText().toString() });

emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,

subject.getText());

emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,

emailtext.getText());

emailIntent.putExtra(Intent.EXTRA_STREAM, Uri

.parse("android.resource://"

+ getPackageName() + "/" + R.drawable.icon));

FB.this.startActivity(Intent.createChooser(emailIntent,

"Send mail..."));

}

});

}

}

So this are the simple code for send email with attcahed file in android

I think u have enjoyed this code.

Wednesday, December 22, 2010

Eclipse plugin updates and installations

1.1. Overview

The Eclipse platform provides an installation and update mechanism called p2. This update mechanism allow to install new Eclipse functionality and to update existing. Eclipse p2 can be integrated into Eclipse RCP applications.

The update and installation of functionality with p2 is based on Eclipse Features Feature simply describe a list of plugins and other features.

1.2. Prerequisites

You should know how to develop Eclipse plugins and Eclipse RCP application. See Eclipse Plugins Development and Eclipse RCP Development for further information.

Create base application

2.1. Create plugin and feature project

Create a Eclipse RCP project "de.vogella.rcp.p2.base" based on the "Eclipse RCP with a view" template. Create a feature project "de.vogella.rcp.p2.base.feature" which includes the plugin "de.vogella.rcp.p2.base".

Add a product configuration called "p2base.product" to your "de.vogella.rcp.p2.base" plugin. Select that this product will be based on "features".

2.2. Adding the p2 UI

The pre-defined p2 UI can be found in the feature "org.eclipse.equinox.p2.user.ui". Add this feature to your product. You also need to make the p2 UI visible in your application. Create a new menu in your application and add the pre-defined commands "org.eclipse.equinox.p2.ui.sdk.update", "org.eclipse.equinox.p2.ui.sdk.install" and "org.eclipse.ui.window.preferences" to the menu. If you start your application you should already seen the menu entries but p2 does not work in an application which is started from the workbench you need to export your product.

Export your product via the "Eclipse Product export wizard" on the overview tab of p2base.product. Make sure to select the "Generate metadata repository" flag on the export dialog.

2.3. Create category

In your feature project create file File -> New -> Other -> "Category Definition" a new category for your feature.

Press "New Category" and create a category, e.g. with the name "vogella.de". Add your feature to this category.

2.4. Export your feature

Export your feature via File -> Export -> "Deployable features". Deploy it to a local directory on your machine. Make sure you select on the Option tab your "category.xml". Also make sure to select "Generate metadata repository".

2.5. Test

Try if this feature can be installed into your Eclipse IDE. See Using the Eclipse Update Manager for information on how to use the Eclipse update manager. Use the update manager and point to your local directory. Restart the IDE after installation. You should have a new command after the installation.

After a restart of your Eclipse IDE you should have an additional menu entry.

Using the Eclipse Update Manager revert this installation.

Create RCP application

Using the "Hello RCP" template create a Eclipse RCP application in plugin "de.vogella.p2.app". Create a feature "de.vogella.p2.app.feature" which includes plugin "de.vogella.p2.app" and "org.eclipse.rcp".

In the plugin "de.vogella.p2.app" create a new product configuration "app.product". The product should be feature based. Export your product and make sure you can start it. Please see Eclipse RCP for details.

Add p2 to your RCP application

Add the feature "org.eclipse.equinox.p2.user.ui" to your product. Adjust your runtime configuration and run your product again. You should see now difference.

The p2 commands attach themself to the menu with the ID "help". Create a menu with the id "help" and re-run your application. See Eclipse Commands Tutorial if you need information on how to define a menu.

If you select the menu you will get an error message.

Export your product then you should be able to open the update manager.

Use the update manager to install your "de.vogella.p2.add.command.feature" feature.

Sunday, December 19, 2010

Google launches eBooks for Android Phones

Google has launched a new eBook store to read digital books optimized for Android devices running 2.1 (Eclair) or higher that enhances reading experience. Google eBooks enables readers to purchase eBooks from major publishers and read them on a standard web browser or native apps.

Google eBooks is also available for reading through Adobe PDF and ePUB files that extends to reading on Barnes & Noble NOOK, Sony Reader, and some other devices by file transfer.

Google has the largest library of free, public-domain titles and paid ebooks with over 3 million titles available for readers.

Features

  • Choose from among five fonts in the standard “flowing text” mode that uses native fonts of the device to display the text
  • Choose settings to adjust the font, text size, line spacing, justification, and for adjusting screen brightness
  • Switch to a scanned book and see original pages as it appears in print
  • Zoom by pinch
  • Choose day or night themes
  • Offline reading
  • Night-reading mode

Google eBooks Google eBooks2

Video :::

Friday, December 17, 2010

Hide the title bar in Android Application

Hello Friends ,

There are simple code for hide the title bar in android.

But there are two way for hide the title bar in android.

First Way is.....

It is through AndroidManifest.xml . You can give the below source in your androidmanifest.xml

to hide the title bar.
<activity android:name=".Your Class"
android:theme="@android:style/Theme.NoTitleBar">
</activity>


So this are simple code for android manifest file.

Now the second way......


In your java file below code will be used

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
}


So this code will be very useful for hide the title bar in android application.

Thursday, December 16, 2010

Play Video From raw Folder In Android

Hello ,

This is the simple application for play video in android. This video play from raw folder.

And this are the simple of basic application .

And this are the source code for play video from raw folder.

First save video in res/raw folder. And then complete you code given below.

main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<VideoView android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:id="@+id/VideoView"></VideoView>
</LinearLayout>

Video.java

package com.image;

import java.net.URI;

import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;

public class image extends Activity {
private static final String TAG = "PRANJAL";
private boolean isImage = false;
private String reviewImageLink;
private MediaController mc;


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
VideoView vd = (VideoView) findViewById(R.id.VideoView);

Uri uri = Uri.parse("android.resource://" + getPackageName() + "Name OF Video store in raw folder");

mc = new MediaController(this);
vd.setMediaController(mc);

vd.setVideoURI(uri);
vd.start();
}

}

I think u have useful this code.

Tuesday, December 14, 2010

Download Image on SDCard From URL In Android

Hello ,

This Articles for Download Image On SDCard From URL.

This is very simple code for download image on sdcard.

In download image on sdcard You have to give three permission from AndroidMenifest.xml file.

This are the three Permission Given below.

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>


This are the very important permision for downloadin image on sdcard in android.

Now in res/values/string.xml file change your URL. For giving any URL And download image

file from URL. And this image save on sdcard.

This are very simple code for image save on sdcard in android.

And This are given below Image. Downloaded Image save on sdcard.





If you Download Project Click Here Download

So I think this are very useful code for developer.

Sunday, December 12, 2010

Created SD Card in Android Emulator and copy files into, in Eclipse, in Emulator and in DDMS.

Create a new AVD in Eclipse:

- Start Eclipse, click Window on the top menu, and click Android SDK and AVD Manager.

- New a AVD


- Name your new AVD, select Target, type 1000M in SD Card and select skin. Click Create.
note: SD Card must be either a file path or a size such as 128K 0r 64M. type 1000M now to create a SD Card of 1G.

- Select and Start the new AVD.


After the Emulator started, you can close the AVD Manager.

Create folder in SDCard

I can't find any File Manager in Android Emulator. Fortunately, Android Emulator provide a DevTools with Terminal, so you can create a folder using Linux command inside Android Emulator.

- Click the ARROW on the screen to display the available application.

- Click DevTools.


- Scroll down to start Terminal Emulator


- It's the same a terminal in Linux, you can ls to view the current files and folders in your $home.


- Now change into sdcard and create a folder, say pictures.
$cd sdcard
$mkdir pictures

It's the only two line of command in this approach.


Copy files from your host system into Android SDCard

- With the Emulator is running. Now go back to Eclipse, switch to DDMS Perspective

Click the arrow on the menu bar and select DDMS

or

Click Window > Open Perspective > others > to select DDMS

- Select the device in the window on the left, eg. emulator-5554.
(Without select the device, you will fail in copying files into.)

- In DDMS, select File Explorer tag in the window on the right. Expend sdcard folder. Now, you can see the pictures folder in the tree. And also, you can see the Permissions of the folder.


- Select the pictures folder, and click Push a file onto the device .

- Browse to and select the files from your host, to push onto the Android Emulator.

- Further expend the folder pictures, you can see the new file here.

Simple Sppiner Example In Android

Hello Friend ,

This are the simple spinner in android.

In Android, Spinner is nothing but a combo box or list box.

It lets you viewing multiple items and allows you to select one item from the list.

Edit Your XML code like this And it is very simple xml code.

main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Spinner
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/spin"
/>
</LinearLayout>


And Now code for java given below.


spinner.java

package com.spinner;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Spinner;

public class spinner extends Activity {
/** Called when the activity is first created. */
private String array_spinner[];

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

array_spinner = new String[5];
array_spinner[0] = "Name";
array_spinner[1] = "Address";
array_spinner[2] = "Phone";
array_spinner[3] = "Mobile";
array_spinner[4] = "Home";
Spinner s = (Spinner) findViewById(R.id.spin);
ArrayAdapter adapter = new ArrayAdapter(this,
android.R.layout.simple_spinner_item, array_spinner);
s.setAdapter(adapter);

}
}

And Now The OUTPUT Given Below.


Wednesday, December 8, 2010

Overview

1.1. What is Python

Python is an interpreted programming language and claims to be a very effective programming language. Python was develop from Guido van Rossum. The name Python is based on the the TV show "Monty Python’s Flying Circus". During execution the Python source code is translated into byte-code which is then interpreted by the Python interpreter. Python source code can also run on the Java Virtual Machine, in this case you are using Jython.

Key features of Python are:

  • high-level data types, as for example extensible lists

  • statement grouping is done by indentation instead of brackets

  • variable or argument declaration is not necessary

  • supports for object-orientated, procedural and / or functional programming style

1.2. Block concept in Python- Indentation

Python follows a different way then other programming languages to identify blocks on related code. A block is identified by indentation. If you have an if statement and the next line is indented then it means that this indented block belongs to the if. The Python interpreter supports either spaces or tabs, e.g. you can not mix both. The most "pythonic" way is to use 4 spaces per indentation level.

1.3. About this tutorial

This tutorial will first explain how to install Python and the Python plugins for Eclipse. It will then create a small Python project to show the usage of the plugin. Afterwards the general constructs of Python are explained.

Installation

2.1. Python

Download Python from http://www.python.org . Download version 2.6.x from Python. If you are using Windows you can use the native installer for Python.

2.2. Eclipse Python Plugin

The following assume that you have already Eclipse installed. For an installation description of Eclipse please see Eclipse IDE for Java .

For Python development under Eclipse you can use the PyDev Plugin which is an open source project. Install PyDev via the Eclipse update manager via the following update site. http://pydev.org/updates .

2.3. Configuration of Eclipse

You also have to maintain in Eclipse the location of your Python installation. Open in the menu Window -> Preference and select Pydev-> Interpreter Python

Press new and maintain the path to "python.exe" in your installation directory.

The result should look like the following.

Your first Python program in Eclipse

Select File -> New -> Project. Select Pydev -> Pydev Project.

Create a new project with the name "de.vogella.python.first". Select Python version 2.6 and your interpreter.

Press finish.

Select Window->Open Perspective ->Other. Select the PyDev perspective.

Select the "src" folder of your project, right-click it and select New -> PyDev Modul. Create a module "FirstModule".

Create the following source code.

   
'''
Created on 18.06.2009

@author: Lars Vogel
'''
def add(a,b):
return a+b

def addFixedValue(a):
y = 5
return y +a

print add(1,2)
print addFixedValue(1)

Right-click your model and select Run As -> Python run.

Congratulations! You created your first (little) Python modul and ran it!

Debugging

Just right click in the source code and add a breakpoint.

Then select Debug as -> Python Run

You can now inspect and modify the variables in the variables view.


Via the debug buttons (or shortcuts F5, F6, F7, F8) you can move in your program.

You can use F5 / F6, F7 and F8 to step through your coding.

Table 1. Debugging Key bindings

CommandDescription
F5 Goes to the next step in your program. If the next step is a method / function this command will jump into the associated code.
F6 F6 will step over the call, e.g. it will call a method / function without entering the associated code.
F7F7 will go to the caller of the method/ function. So this will leave the current code and go to the calling code.
F8Use F8 to go to the next breakpoint. If no further breakpoint is encountered then the program will normally run.

You can of course use the ui to debug. The following displays the keybindings for the debug buttons.

Programming in Python

5.1. Comments

The following create a single line comment.

    
# This is a comment

5.2. Variables

Python provides dynamic typing of its variables, e.g. you do not have to define a type of the variable Python will take care of this for you.

    
# This is a text
s= "Lars"
# This is an integer
x = 1
y=4
z=x+y

5.3. Assertions

Python provides assertions. These assertions are always called.

    
assert(1==2)

5.4. Methods / Functions in Python

Python allows to define methods via the keyword def. As the language is interpreted the methods need to be defined before using it.

    
def add(a,b):
return a+b

print add(1,2)

5.5. Loops and if clauses

The following demonstrates a loop the usage of an if-clause.

    
i = 1
for i in range(1, 10):
if i <= 5 :
print 'Smaller or equal then 5.\n',
else:
print 'Larger then 5.\n',

5.6. String manipulation

Python allows the following String operations.

Table 2.

OperationsDescription
len(s)Returns the length of string s
s[i]Gets the element on position i in String s, position start with zero
s[-i]Get the i-tes Sign of the string from behind the string, e.g. -1 returns the last element in the string
"abcdefg"[0:4]Gets the first 4 elements (abcd)
"abcdefg"[4:]Gets the elements after the first 4 elements (abcd)
`a`+`b` + `c`Concatenates the int varibles a, b,c, e.g. if a=1, b=2, c=3 then the result is 123.
s.lower()Result will be s in lower cases
s.upper()Result will be s in upper cases
s.startswith(t)True, if s startsWith t
s.rstrip()Removes the end of line sign from the string

For example:

    
s = "abcdefg"
assert (s[0:4]=="abcd")
assert ( s[4:]=="efg")
assert ("abcdefg"[4:0]=="")
assert ("abcdefg"[0:2]=="ab")

5.7. Concatenate strings and numbers

Python does not allow to concatenate a string directly with a number. It requires you to turn the number first into a string with the str() function.

If you don't use str() you will get "TypeError: cannot concatenate 'str' and 'int' objects".

For example:

    
print 'this is a text plus a number ' + str(10)

5.8. Lists

Python has good support for lists. See the following example how to create a list and how to access individual elements or sublists.

    
'''
Created on 14.09.2010

@author: Lars Vogel
'''
list = ["Linux", "Mac OS" , "Windows"]
# Print the first list element
print(list[0])
# Print the last element
# Negativ values starts the list from the end
print(list[-1])
# Sublist - first and second element
print(list[0:2])

5.9. Processing files in Python

The following example is contained in the project "de.vogella.python.files".

The following reads a file, strips out the end of line sign and prints each line to the console.

    
'''
Created on 07.10.2009

@author: Lars Vogel
'''

f = open('c:\\temp\\wave1_new.csv', 'r')
print f
for line in f:
print line.rstrip()
f.close()

The following reads the same file but write the output to another file.

    
'''
@author: Lars Vogel
'''

f = open('c:\\temp\\wave1_new.csv', 'r')
output = open('c:\\temp\\sql_script.text', 'w')
for line in f:
output.write(line.rstrip() + '\n')
f.close()

5.10. Splitting strings and comparing lists.

The following example is contained in the project "de.vogella.python.files". It reads to files which contain one long comma separated string. This string is splitted into lists and the lists are compared.

    
f1 = open('c:\\temp\\launchconfig1.txt', 'r')
s= ""
for line in f1:
s+=line
f1.close()

f2 = open('c:\\temp\\launchconfig2.txt', 'r')
s2= ""
for line in f2:
s2+=line
f2.close()
list1 = s.split(",")
list2 = s2.split(",");
print(len(list1))
print(len(list2))


difference = list(set(list1).difference(set(list2)))

print (difference)

5.11. Classes in Python

The following is a defined class in Python. Python uses the naming convension __name__ for internal functions.

Python allows operator overloading, e.g. you can define what the operator + will to for a specific class.

Table 3.

__init__Constructor of the class
__str__The method which is called if print is applied to this object
__add__+ Operator
__mul__* Operator

The empty object (null) is called "None" in Python.

    
class Point:
def __init__(self, x=0, y=0):
self.x = x
self.y = y
def __str__(self):
return "x-value" + str(self.x) + " y-value" + str(self.y)
def __add__(self,other):
p = Point()
p.x = self.x+other.x
p.y = self.y+other.y
return p

p1 = Point(3,4)
p2 = Point(2,3)
print p1
print p1.y
print (p1+p2)

Google App Engine

Google offers free hosting of small Python based web application. Please see Google App Engine development with Python .

Sunday, December 5, 2010

Iphone UITable View In Android..

Hello Friends,

I am developer in android.

I have created UITable View in android. This UITable View make simple functionality in

iphone. But in android there are lots of differnce.

I make one UITable view similar functionality like uitableview in iphone to in android.

This UITable view has simple connectivity from database.

If you run this application you can make new AVD. Created AVD has lots of space. Because

this project size has 30 MB or many more so you created lots of space AVD And this project

can be run on SDK Verison 7 or 8.

This Project ScreenShot Giving below. And It is very similar functionality like uitableview

in iphone to in android. I hope you have Enjoyed my application.

Screen Shot 1


Screen Shot 2

Screen Shot 3

If you download this project click here Download Link.

DOWNLOAD

Saturday, December 4, 2010

Eclipse Feature Project

A feature project is basically a list of plugins and other features which can be understood as a logical separate unit. As of Eclipse 3.6 features can be used as the basis for a launch configuration. Eclipse also uses feature projects for the updates manager and for the build process. You can also supply a software license which a feature.

The following description will focus on the creation of features. Feature can be used for grouping Eclipse Plugins or for the development of Eclipse RCP applications .

Creating a feature project

The following will explain how to create an Eclipse feature project.

2.1. Create Plugin

Create a Eclipse RCP application "de.vogella.featuretest.testplugin". Use the "RCP application with a view" as a template.

2.2. Create Feature Project

Create a feature project "de.vogella.featuretest.feature" via File ->New -> Other -> Plug-in Development -> "Feature Project".

2.3. Feature Project Properties

In your new project you have now a file feature.xml. Select this file to get an editor to maintain the properties. For example change the name of your feature to the project name "de.vogella.featuretest.feature".

The tab "Plug-ins" allows you to change the plugins which are in the feature.

2.4. Finished

You have created a feature project. This feature project contains only one plugin but in general you would add a group of related plugins to your feature. The feature can then be the basis for building your software, for automatic update functionality and for creating launch configuration.

Thank you

If you like this tutorial please support this website.

Wednesday, December 1, 2010

Eclipse PDE/Build

PDE/Build is a Apache Ant based build system for Eclipse RCP application and Eclipse plugins. This build system is also called "headless" build because it does not require a running Eclipse UI to create your product.

The PDE build system is part of the Eclipse plugin org.eclipse.pde.build.

Tip

This tutorial will use the Ant functionality inside Eclipse and does not require a separate Ant installation. To run PDE/Build outside Eclipse you need to have Ant separately installed (see Apache Ant for details.

This tutorial uses PDE build to create a executable application for an Eclipse RCP project.

Tip

Check also the PDE build help in the Eclipse help under Help -> Help Contents -> Plug-in Development Environment Guide -> Tasks

Eclipse Deltapack

2.1. Download

The delta pack is required to use PDE/build.

This deltapack contains the platform specific features and plugins which are required for building Eclipse product for all platforms. It also includes binary launchers for all platforms in the feature "org.eclipse.equinox.executable".

Tip

The deltapack is also required to export your product for multiple platform via the user interface. See Interactive deployment of Eclipse RCP products .

The deltapack can be found http://download.eclipse.org/eclipse/downloads/ . Select the release for are interested in, e.g. 3.5 and search on the page for "Delta".

Extract the delta pack to a new directory, I recommend to use eclipse install directory and then "/deltapack/eclipse/". So if you installation directory is c:\eclipse35 then it should look like the following.

2.2. Target Platform

To make the delta pack available to the Eclipse IDE add it to the target platform under Windows-> Preferences-> Plug-in Development -> Target Platform. Edit the exiting target platform and add the directory of the delta pack to it.

Create your application

3.1. Pre-requirements

The following assumes that you are familiar with Eclipse RCP development, e.g. the creation of plugins, features and products. Check Eclipse RCP Tutorial to learn about RCP development. See Eclipse Feature Project to learn how to create feature projects.

PDE/Build requires features based products. In our example we will create one plugin and then a feature which includes this plugin.

3.2. Create plugin and feature

Create a new project "de.vogella.build.ui" using the "RCP application with a view" template. See Eclipse RCP Tutorial for details.

Create a feature project "de.vogella.build.feature" which contains the plugin de.vogella.build.ui. See Eclipse Feature Project

Add the plugin "de.vogella.build.ui" to your feature.

Also add the "org.eclipse.rcp" to "Included Feature".

Create a product called "hellorcp.product" in "de.vogella.build.ui". See Create a Eclipse product for information.

Make sure your product runs correctly can can be exported manually via the "Export Product export wizard" in the product. If the manually exported product runs you are ready for the next step in creating a automatic product build.