Posts

Secure SMS Android Application

Image
What is Secure SMS?

Secure SMS is a Messaging application which provides you a Secure SMS messaging service. You can send and receive Secure SMS via this application. Messages can be sent to a person who has this Secure SMS app and to a person who does not has this app.



User can configure application password when application opened in first time.




Inbox

Inbox will show you, the Messages which received by you from Secure SMS application or from configured number. You can delete inbox message by Context Menu(To show a context menu on long click). By clicking on each message you can view full message body, sender and sent time.



My First Android Application

What is android:
    Android is a Linux based Mobile Operating system, which developed by Google's. 

 Two weeks ago I published my first Android Application. I called it as Zip/ Postal code Catcher. Why I have used Zip/ Postal ??  Because some countries Use Postal code, and some countries called it as Zip code.Then I named it as Zip/ Postal Code Catcher. Zip/ Postal Code Catcher is a free android application.

Application Features :
Search Postal codes over 30 countries.If Provided city name does not match, then it will display the nearest matching postal codes.  Using GPS based Postal code search option, you can find the nearest five post-office codes(sorted with air distance) This Application totally based on JSON web service access. In My first release GPS based postal code catching option is not included. But last Thursday, I have added GPS based postal code search option. By the way, currently it is being used by 707 users :)  . 

Market Link : https://play.google.…

Spring-Hibernate Maven project- Part 3

Image
Hibernate Configuration and Project Deployment


In the previous post I created the hibernate mapping files for the Person-Address domain classes. In here we are going to create the hibernate configuration file which creates the database connection according to the defined URL, credentials and other properties.

On the deplyment of the project, the hibernate configuration file is executed through the commands in pom.xml.

We have to put the hibernate configuration file inside the src/main/resources directory. For that right cick on the directory, select new, select other. From there expand the hibernate icon and select Hibernate Configuration file (cfg.xml).

Click Next

Keep the default name "hibernate.cfg.xml" same and click Next
Give the values in the appeared window give the values as follows.

Make sure to verify your mysql username and password, and enter the corret one according to your mysql configuration.
hibernate.cfg.xml
<hibernate-configuration> <session-fa…

Spring-Hibernate Maven project- Part 2

Image
Hibernate Mapping

Here the two domain classes have one-to-many relationship. One Person can have many Addresses while one Adress can have only one person. So there is a one-to-many relationship between Person and Address.

In hibernate we have to create the mapping file for each domain class. The mapping file represents the database table which is mapped with the domain class. The table will be created according to things indicated inside mapping classes.

Mapping file for Person.java: - Person.hbm.xml
Mapping file for Address.java: - Address.hbm.xml

Mapping files are located inside src/main/resources. If you have configured Hibernate to be used inside Eclipse you can simply use it. Otherwise let's configure eclpse for hibrenate.

Hibernate-Eclipse Configuration 

Download Hibernate tools from here.
Extract the HibernateTools-3.X.zip file and put all the files inside the features folder into the features folder of the eclipse installation directory and put all the files inside the plu…

Spring-Hibernate Maven project- Part 1

Image
Here the maven project created in last post, will be extended to add new Persons in to system who has multiple Addresses.

Add the Spring Hibernate dependencies into pom.xml file inside project tags, after the version tag.
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.test.testapp</groupId> <artifactId>testapp</artifactId> <version>0.0.1-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>3.3.1.GA</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> <version>${springVer…

Create a Simple Maven Project

Image
Open Eclipse.
Create a new maven project. File--New--Other
New Wizard will open. There go to maven icon and expand it. Then Select Maven Project item.




Click Next.
In the New Maven Project wizard, select the create a simple project (skip archetype selection) check box.



Click Next
In the New Maven Project wizard enter the following values.


Group Id: org.test.testapp
Artifact Id: testapp
Version: 0.0.1-SNAPSHOT
Packaging: jar



Installing Apache Maven and Configuring Eclipse with Maven

Image
Installing Maven into your PC - Windows

Download Maven from here.MavenDownload Unzip the file and put into Program files. So the Maven path would be C:\Program Files\apache-maven-2.2.1
Setting the Maven Environment Varable

Right click My Computer Go to advanced tab Click “Environment Variables” button In the System variables click new button. Set the path to Maven directory and give M2_HOME as variable name as follows.
Click ok. Now from the System Variable set select “Path” variable and click edit. Add the ;% M2_HOME%/bin; at the end of path value as follows.
Click ok. Verify the Installation Open command line and type mvn command.



Installing Maven into your PC - Ubuntu

Unzip maven archive in to what ever location and set the path using one of below option.

Using Command permanent:

sudo ln -s /your/maven/location/bin/mvn /usr/bin/mvn

Option Two Temporary:

export M2_HOME=/your/maven/location/
export M2=%M2_HOME%\bin

Eclipse-Maven Configuration


Note that for Eclipse Update for Maven does not require Ap…