Wednesday, September 30, 2009

Mobile Application Development -Basic Logic to be used to design the application for mobile handsets

Mobile Handset Application Development Logic Design and Architecture:-

After discussing about different mobile platforms and their architecture in general.Now I feel to share the basic logic to develop any mobile application.
I am going to explain in brief about the design and architecture which a developer should follow to develop any mobile application. It may vary depending on the type of application but the basic design logic will be same .

Our application can be divided into front-end and back-end.
Front end will be having the User Interface (UI) related code and backend will handle the functionalities.

So, in short we can divide our code into App,Core,UI.

App:-

App part will handle system level events like key handling, user attention.
I am missing few more events ,will mention them very soon .It's not clicking
my mind presently :) :). In app part only each application has to register itself for the user attention plugin. User attention gives an application the priority to be displayed to the user. There will be a priority table maintained for it and each application will be having it's own priority predefined in that table.
For example " Call Handling" application has the highest priority in mobile phone once it is switched on.

That's the reason ,even if you are writing some message or playing some game and meanwhile some call comes to your mobile. You will immediately see the "calling screen" with the mobile number which from which you are receiving call.

This happens because call handling has the highest priority and so user attention immediately goes to this application .


Core:- Core part will handle the functionalities corresonding to any application as soon as there is some user activity on the UI. An event is fired and event handler will be there to handle that particular event.Say for example, you have made some change in the delivery report option of Messaging application.

If the user has selected the "delivery report" as "ON" . As soon as this option is saved ,an event will be fired and a callback function will be called to handle it's state . In the core part these things will happen and it will connect to database using DB manager Api's and the corresponding setting selected by the user will be saved into the DB. In core part we will be maintaining the different screen states for navigation and based on our requirement we need to hide and show those screens.

UI : This part basically deals with the look and feel for the user. Usually most of the platforms will provide it's user interface toolkit so that application development can be made faster. Since every mobile company is trying to come out with a new model every quarter ,so the development should be made faster and hence they are maintaining this architecture to reuse the pre-existing apis and code.

For user interface in mobile phone ,we basically have different kind of displayables like Form,Canvas,Textbox,List and many more.
Similary we have different items like string,gauge( to show the progress bar of battery charging),image ,date field etc. All these UI items will be based on MIDP ( mobile information device profile)2.0 standard to achieve interoperatibility.
I am not sure whether there has been some revision in MIDP2.0 standard or still the same is going on. :) :)

We have to select a displayable for each screen and on that we have to put the items . We can put commands for navigation on each screen. These commands will help in navigating from present to previous and next screens. We follow the concept of hiding and showing of screens if we need that screen else we will destroy and fee that memory.

Hope, it might have given a brief idea about mobile application architecture design. :) :)

Tuesday, September 29, 2009

How to remove " Error: failed dependencies

Installation of JRE on Linux systems

Contents

System Requirements
Java SE Runtime Environment Installation Instructions
Installation of Self-Extracting Binary
Installation of RPM File
Java Plugin Browser Registration Instructions
Java Web Start Installation Notes

System Requirements

See supported System Configurations for information about supported platforms, operating systems, desktop managers, and browsers.

For issues, see the Troubleshooting section of the JDK installation notes.

Installation Instructions

Installing the Java SE Runtime Environment automatically installs the Java Plugin and Java Web Start. Note that the Java Plugin needs to be registered with the browser. After installing the JRE, refer to: Install formats - The JRE is available in two installation formats.
  • Self-extracting Binary File - This file can be used to install the Java SE Runtime Environment in a location chosen by the user. This one can be installed by anyone (not only root users), and it can easily be installed in any location. As long as you are not root user, it cannot displace the system version of the Java platform supplied by Linux. To use this file, see Installation of Self-Extracting Binary below.

  • RPM Packages - A rpm.bin file containing RPM packages, installed with the rpm utility. Requires root access to install. RPM packages are the recommended method of installing JRE on Linux. To use this bundle, see Installation of RPM File below.
Choose the install format that is most suitable to your needs.
Note: For any text on this page containing the following notation, you must substitute the appropriate Java SE Runtime Environment update version number for the notation.

For example, if you are downloading update 1.6.0_01, the following command:
./jre-6-linux-i586.bin
would become:
./jre-6u1-linux-i586.bin

Installation of Self-Extracting Binary

Use these instructions if you want to use the self-extracting binary file to install the Java SE Runtime Environment. If you want to install RPM packages instead, see Installation of RPM File.

1. Download and check the download file size to ensure that you have downloaded the full, uncorrupted software bundle.

You can download to any directory you choose; it does not have to be the directory where you want to install the Java SE Runtime Environment.

Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.

2. Make sure that execute permissions are set on the self-extracting binary.
Run this command:
chmod +x 6-linux-i586.bin

3. Change directory to the location where you would like the files to be installed.

The next step installs the Java SE Runtime Environment into the current directory.

4. Run the self-extracting binary.

Execute the downloaded file, prepended by the path to it. For example, if the file is in the current directory, prepend it with "./" (necessary if "." is not in the PATH environment variable):

./jre-6-linux-i586.bin

The binary code license is displayed, and you are prompted to agree to its terms.

The Java SE Runtime Environment files are installed in a directory called jre1.6.0_ in the current directory. Follow this link to see its directory structure.

Note about Root Access: Unbundling the software automatically creates a directory called jre1.6.0_. Note that if you choose to install the Java SE Runtime Environment into system-wide location such as /usr/local, you must first become root to gain the necessary permissions. If you do not have root access, simply install the Java SE Runtime Environment into your home directory, or a subdirectory that you have permission to write to.

Note about Overwriting Files: If you unpack the software in a directory that contains a subdirectory named jre1.6.0_, the new software overwrites files of the same name in that jre1.6.0_ directory. Please be careful to rename the old directory if it contains files you would like to keep.

Note about System Preferences: By default, the installation script configures the system such that the backing store for system preferences is created inside the Java SE Runtime Environment's installation directory. If the JRE is installed on a network-mounted drive, it and the system preferences can be exported for sharing with Java runtime environments on other machines.

See the Preferences API documentation for more information about preferences in the Java platform.

Installation of RPM File

Use these instructions if you want to install Java SE Runtime Environment in the form of RPM packages. If you want to use the self-extracting binary file instead, see Installation of Self-Extracting Binary.

1. Download and check the file size.

You can download to any directory you choose.

Before you download the file, notice its byte size provided on the download page on the web site. Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.

2. Become root by running the su command and entering the super-user password.

3. Extract and install the contents of the downloaded file.

Change directory to where the downloaded file is located and run these commands to first set the executable permissions and then run the binary to extract and run the RPM file:

chmod a+x jre-6-linux-i586-rpm.bin

./jre-6-linux-i586-rpm.bin

Note that the initial "./" is required if you do not have "." in your PATH environment variable.

The script displays a binary license agreement, which you are asked to agree to before installation can proceed. Once you have agreed to the license, the install script creates and runs the file jre-6-linux-i586.rpm in the current directory.

NOTE - If instead you want to only extract the RPM file but not install it, you can run the .bin file with the -x argument. You do not need to be root to do this.

4. Delete the bin and rpm file if you want to save disk space.

5. Exit the root shell.

Java Plugin Browser Registration Instructions

See Java Plugin Browser Registration Instructions in the JDK Installation Notes for Linux.

Java Web Start Installation Notes

This Java SE Runtime Environment release includes Java Web Start; it is installed automatically with the Java SE Runtime Environment. But note the following:

  • Compatibility: The release of Java Web Start that comes with this JDK/JRE can be run on SDK/JRE 1.2.2 or later. It will not work with SDK/JRE 1.1.x or earlier.
  • Upgrading from Previous Versions: If you have a previous release of Java Web Start, do not uninstall it. Uninstalling it will cause the download cache to be cleared, and all previously installed Java Web Start applications will have to be downloaded again. This new release will overwrite previous installations and automatically update browsers to use this new release. The configuration files and program files folder used by Java Web Start have not changed, so all your settings will remain intact after the upgrade.
  • Using Java Web Start with Netscape 6.x/7.x: For Netscape 6.x/7.x users, setup the Java Web Start MIME type (JNLP) in the Edit->Preferences->Navigator->Helper Applications section. The file extension is jnlp; MIME Type is application/x-java-jnlp-file. It should be handled by the javaws executable file in your Java Web Start directory. Also note that, due to a problem with the JavaScript in Netscape 6.x/7.x, you must use the non-JavaScript version of the demos page

How to Install Java on Linux?

Steps to Install Java on Linux:-

This article applies to:
  • Platform(s): Red Hat Linux , SUSE Linux , JDS
  • Browser(s): Netscape 6.2x , Netscape 7 , Mozilla 1.4+
  • Java version(s): 1.5.0 , 6.0

Follow these steps to download and install Java for Linux.
  1. Download
  2. Install
  3. Enable and Configure
  4. Test Installation


Linux system requirements

Platform Version Memory Browsers Diskspace
LINUX 32-bit
Intel IA32 Red Hat 9.0 64mb Mozilla 1.4+ 58 MB
Red Hat Enterprise Linux AS 3.0 64mb
Red Hat Enterprise Linux WS 2.1 64mb
Red Hat Enterprise Linux ES 2.1 64mb
Red Hat Enterprise Linux AS 2.1 64mb
SuSE 8.2 64mb
SLEC 8 64mb
SLES 8 64mb
TurboLinux 8.0 64mb
Sun Java Desktop System, Release 1 64mb
Sun Java Desktop System, Release 2 64mb
AMD Opteron 32-bit Red Hat Enterprise Linux AS 3.0
SLES 8
LINUX 64-bit
AMD Opteron 64-bit Red Hat Enterprise Linux AS 3.0
Mozilla 1.4+ 56 MB
SLES 8




Download
  1. Go to http://java.com
  2. Click on Free Java Download button
  3. There are two types of installation packages. Linux RPM package or Linux self extracting binary file. Download the package that best suits your needs.

    Note: Linux RPM (Redhat Package Manager) uses RPM to install Java. In order to use this method, you need to have RPM available on your system. Otherwise use the other option.
Linux Download Options
  1. Click the appropriate Download button to download the package that best suits your needs. You can download the file to any of the directories on your system.
  2. After download verify:
  3. For Linux self extracting binary file
    • Name of the file is jre-1_6_0_02-linux-i586.bin
    • Size is approximately 15.8 MB
    For Linux RPM packages
    • Name of the file is jre-1_6_0_02-linux-i586-rpm.bin
    • Size is approximately 15.26 MB

Install

  • Linux self extracting binary file
  • Linux RPM package

  • Note: For any text on this page containing the following notation, you must substitute the appropriate Java version number for the notation.

    For example, if you are downloading update 1.6.0_01, the following command:
    ./jre-6-linux-i586.bin
    would become:
    ./jre-6u1-linux-i586.bin

    To install the Linux (self-extracting) file Follow these instructions:
    1. At the terminal: Type:
      su
    2. Enter the root password.
    3. Change to the directory in which you want to install. Type:
      cd
      For example, to install the software in the /usr/java/ directory, Type:
      cd /usr/java/

      Note about root access: To install Java in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the Java in your home directory or a subdirectory for which you have write permissions.
    4. Change the permission of the file you downloaded to be executable. Type:
      chmod a+x jre-6u-linux-i586.bin
    5. Verify that you have permission to execute the file. Type:
      ls -l
    Make sure the installation file has executable permission
    1. Start the installation process.Type:
      ./jre-6u-linux-i586.bin

      This displays a binary license agreement. Read through the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.
    type YES to agree to the license agreement
    1. Java is installed into its own directory. In this example, it is installed in the /usr/java/jre1.6.0_ directory. When the installation has completed, you will see the word Done.
    The installation completes
    1. Java is installed in jre1.6.0_ sub-directory under the current directory. In this case, Java is installed in the /usr/java/jre1.6.0_ directory. Verify that the jre1.6.0_ sub-directory is listed under the current directory. Type:
      ls
    Verify the installation filename

    The installation is now complete. Skip to the Enable and Configure section.
    To install the Linux RPM (self-extracting) file Follow these instructions:
    1. At the terminal: Type:
      su
    2. Enter the root password.
    3. Change to the directory in which you want to install. Type:
      cd
      For example, to install the software in the /usr/java/ directory, Type:
      cd /usr/java

      Note about root access: To install Java in a system-wide location such as/usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install Java in your home directory or a subdirectory for which you have write permissions.
    4. Change the permission of the file you downloaded to be executable. Type:
      chmod a+x jre-6u-linux-i586-rpm.bin
    5. Start the installation process. Type:
      ./jre-6u-linux-i586-rpm.bin

      This displays a binary license agreement. Read through the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.
    type YES to agree to the license agreement
    1. The installation file creates jre-6u-linux-i586.rpm file in the current directory.
    RPM unpacking completes
    1. Run the RPM command at the terminal to install the packages. Type:
      rpm -iv jre-6u-linux-i586.rpm
    2. Java is installed in jre1.6.0_ sub-directory under the current directory. In this case, Java is installed in the /usr/java/jre1.6.0_ directory. Verify that the jre1.6.0_ sub-directory is listed under the current directory. Type:
      ls
    Verify the installation filename

    The installation is now complete. Go to the Enable and Configure section.

    Enable and Configure

  • Mozilla 1.4 and later
  • Mozilla 1.2, Netscape 6 and later
  • Firefox
  • Mozilla 1.4 and later
    1. Go to the plugins sub-directory under the Mozilla installation directory
      cd /plugins
    2. In the current directory, create a symbolic link to Java ns7/libjavaplugin_oji.so file Type:
      ln -s /plugin/i386/ns7/libjavaplugin_oji.so

    3. Example:
      • If Mozilla is installed in this directory:
        /usr/lib/mozilla-1.4/
      • and if the Java is installed at this directory:
        /usr/java/jre1.6.0
      • Then type at the terminal to go to the browser plug-in directory:
        cd /usr/lib/mozilla-1.4/plugins
      • Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
        ln -s /usr/java/jre1.6.0/plugin/i386/ns7
        /libjavaplugin_oji.so .
    4. Start Mozilla browser or restart it if it is already running. Note that if you have other Mozilla components (ie: Messenger, Composer, etc) running, you will need to restart them as well.
    5. Go to Edit > Preferences. Under Advanced category > Select Enable Java
    Mozilla 1.2, Netscape 6 and later
    1. Go to the plugins sub-directory under the Netscape directory
      cd /plugins
    2. Create a symbolic link to the ns7-gcc29/libjavaplugin_oji.so file:
      ln -s /plugin/i386/ns7-gcc29/libjavaplugin_oji.so

    3. Example:
      • If Netscape is installed at this directory:
        /usr/lib/Mozilla1.2/
      • And if the Java is installed at this directory:
        /usr/java/jre1.5.0
      • Then type at the terminal to go to the browser plug-in directory:
        cd /usr/lib/Mozilla1.2/plugins
      • Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
        ln -s /usr/java/jre1.6.0/plugin/i386/ns7-gcc29
        /libjavaplugin_oji.so .
    4. Start Mozilla browser or restart it if it is already running. Note that if you have other Mozilla components (ie: Messenger, Composer, etc) running, you will need to restart them as well.
    5. Go to Edit > Preferences. Under Advanced category > Select Enable Java
    Firefox
    1. Go to the plugins sub-directory under the Firefox installation directory
      cd /plugins

    2. In the current directory, create a symbolic link to the Java ns7/libjavaplugin_oji.so file Type:
      ln -s /plugin/i386/ns7/libjavaplugin_oji.so

    3. Example:
      • If Firefox is installed at this directory:
        /usr/lib/firefox-1.4/
      • And if the Java is installed at this directory:
        /usr/java/jre1.6.0
      • Then type at the terminal to go to the browser plug-in directory:
        cd /usr/lib/firefox-1.4/plugins
      • Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
        ln -s /usr/java/jre1.6.0/plugin/i386/ns7
        /libjavaplugin_oji.so

      In the command line above, use ns7-gcc29 if Firefox was compiled with gcc2.9.

      If you install Firefox 1.5 or later, you can enable the Java Console menu item in the Tools menu. Change directories to the Firefox extensions directory, then unzip ffjcext.zip there.

      cd /usr/lib/firefox-1.4/extensions
      unzip /usr/java/jre1.6.0/lib/deploy/ffjcext.zip

    4. Start the Firefox browser, or restart it if it is already up.

      In Firefox, type about:plugins in the Location bar to confirm that the Java Plugin is loaded. If the version is Firefox 1.5 or later, click the Tools menu to confirm that Java Console is there

    Monday, September 28, 2009

    Mobile Platforms

    Mobile Technology has brought a new revolution in the era of communication.
    It uses a wireless network to provide full duplex communication between the users. It may b either of these three networks, GSM,GPRS & UMTS.
    GSM is circuit switched and GPRS is packet switched network( supports both voice and data services).
    UMTS is the latest one which is usually called 3G network.It provides very high data bandwidth and advanced features like video call and mobile tv.


    I am going to discuss the role of mobile platforms used in mobile handsets
    There are various phones based on different OS like symbian,brew,nucleus,palm,windows.

    So, how exactly is the architecture of these phones?

    Usually a mobile handset has different software layers in it. Mobile platform software has the device drivers at the most bottom layer .

    Above this will be the hardware abstraction layer(HAL).This will act as the interface between the hardware and software of mobile platform.

    Above the HAL, there will be the different protocol stacks like Network Selection ,Multimedia ,application services ,operation services protocol stack. Network selection protocol stack will help the user to select a particular network in mobile phone and radio drivers will be there to communicate to the cellular network at a particular frequency range.

    Multimedia protocol stack provide functionalities of playing audio and video files .

    Likewise we have operation services and application services protocol stacks which provide storage and database features in mobile phones.

    Above this our own applications like phonebook,messaging,call handling,multimedia,PIM,Settings gets developed. Almost 35-40 mobile applications are there which can be developed on the top of these protocol stacks and these applications uses the API's of these protocol stacks.

    Apart from these user interface toolkit will be there to support user interaction and event handling in mobile phones.

    Tuesday, June 23, 2009

    Open Source Projects

    Open Source projects are becoming famous now adays.The reason behind it is the development method which is simpler and more transparent.Moreover, we can get better quality of the product,higher reliability of the customers on the product and perhaps the lesser cost of
    developing the product.

    To hear for the first time, it looks like that open source is entirely free to the user,but its not the fact.Open source doesn't simply mean free distribution of the source-code to anyone. There are certain criterias which needs to be followed
    to be compliant to the open source software.

    1. Free Redistribution

    The license shall not restrict any party from selling or giving away the software as a component of an aggregate software distribution containing programs from several different sources. The license shall not require a royalty or other fee for such sale.

    2. Source Code

    The program must include source code, and must allow distribution in source code as well as compiled form. Where some form of a product is not distributed with source code, there must be a well-publicized means of obtaining the source code for no more than a reasonable reproduction cost preferably, downloading via the Internet without charge. The source code must be the preferred form in which a programmer would modify the program. Deliberately obfuscated source code is not allowed. Intermediate forms such as the output of a preprocessor or translator are not allowed.

    3. Derived Works

    The license must allow modifications and derived works, and must allow them to be distributed under the same terms as the license of the original software.

    4. Integrity of The Author's Source Code

    The license may restrict source-code from being distributed in modified form only if the license allows the distribution of "patch files" with the source code for the purpose of modifying the program at build time. The license must explicitly permit distribution of software built from modified source code. The license may require derived works to carry a different name or version number from the original software.

    5. No Discrimination Against Persons or Groups

    The license must not discriminate against any person or group of persons.

    6. No Discrimination Against Fields of Endeavor

    The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

    7. Distribution of License

    The rights attached to the program must apply to all to whom the program is redistributed without the need for execution of an additional license by those parties.

    8. License Must Not Be Specific to a Product

    The rights attached to the program must not depend on the program's being part of a particular software distribution. If the program is extracted from that distribution and used or distributed within the terms of the program's license, all parties to whom the program is redistributed should have the same rights as those that are granted in conjunction with the original software distribution.

    9. License Must Not Restrict Other Software

    The license must not place restrictions on other software that is distributed along with the licensed software. For example, the license must not insist that all other programs distributed on the same medium must be open-source software.

    10. License Must Be Technology-Neutral

    No provision of the license may be predicated on any individual technology or style of interface.