Thursday, March 17, 2016

Google Map - for Cab booking service -

As I keep telling to many of my friends, today’s modern technology can be used to address the day2day issues in a veryeffective way. Ie, using the power of “Internet of Things”. Technology adoption is very good (I could say the best) in cab services, telecom and banking compare to other areas as many of you aware.

I am referring here the Cab services as Geo/app based cab booking service ins very popular now a days. App based Cab service solved many problems like cab delay, cab booking/Cancellation and consumer & supplier issues. To book any cab service, we want to install the apps from different cab providers. It’s good to rely on one service provider and use their service. But we may be missing the price comparation and the great flexibility of using any cab service for the given source and destination.

Google has come up an innovative solution to solve such issue. Yes, Google map will be a one central point and you can select the source and destination and select the cab service on the GO based on your choice. Also, it gives the ride charge details for various cab service providers. Ie, Ability of booking cab service from Google Map. Sounds interesting?

You can look at the blog Google Map blog for more details about this @ https://maps.googleblog.com/2016/03/your-car-has-arrived-more-ways-to-get.html

Nanjundan Chinnasamy

Wednesday, March 9, 2016

I have planned to write an article for iCal – Calendar event utility using Java technology long back. Due to many reasons, it took some time to prepare this article. I have done with the working POC. You can explore and come back if you have any doubts in iCalendar generation using iCal4j framework.

iCal4j can be used to creating new iCalendar data from scratch OR modifying existing iCalendar data. Here you will find a few examples indicating the recommended usage of this library.

iCal comes with many handy functionality to deal with iCalendar related functionalities. Major functionalities are:
Creating an iCal event
Updating an existing iCal event
Parsing anexisting iCalendar file
Iterating over a Calendar and get the available events

It also provides a functionality to deal with different TimeZones. Here I have added my POC code only for iCalendar file creation alone using iCal framework. You can use this as a reference. Rest of the functionalities will be easy if you understand the iCalendar creation. Those functionalise can be explored at http://ical4j.sourceforge.net/introduction.html

Creating an iCal event – Sample Code:

public static void main(String[] args) throws FileNotFoundException,
                                    IOException, ValidationException, ParserException {
                        String calFile = "c:/mycalendar.ics";

                        // Creating a new calendar
                        net.fortuna.ical4j.model.Calendar calendar = new net.fortuna.ical4j.model.Calendar();
                        calendar.getProperties().add(
                                                new ProdId("-//Temp//iCal4j 1.0//EN"));
                        // calendar.getProperties().add(Version.VERSION_2_0);
                        calendar.getProperties().add(CalScale.GREGORIAN);


                        Calendar calStart = new GregorianCalendar().getInstance();
                        calStart.set(2015, java.util.Calendar.MARCH , 03, 12, 0);
                        Calendar calEnd = new GregorianCalendar();
                        calEnd.set(2015, java.util.Calendar.MARCH, 03, 13, 0);
                        DateTime startTime = new DateTime(calStart.getTime());
                        DateTime endTime = new DateTime(calEnd.getTime());
                        String appmtSubject = "Test appointment_EventId12345";
                       
                        // Create event
                        VEvent appointmentEvent = new VEvent(startTime, endTime, appmtSubject);
                        appointmentEvent.getProperties().add(new Location("NC Home"));
                        StringBuilder appmtSumamry = new StringBuilder();
                        appmtSumamry.append("Dear Friend, \n\n");
                        appmtSumamry.append("This is to catchup with you for 30 mins at my home. \n");
                       
                        appmtSumamry.append("Topic: Chumma\n");
                        appmtSumamry.append("Address: address1, address2, postcode\n");
                        appmtSumamry.append("Telephone: \n");
                        appmtSumamry.append("Purpose: \n\n");
                       
                        appmtSumamry.append("if you need any assistance mean time, please contact us at 1800XXXYYYY");
                       
                        appointmentEvent.getProperties().add(new Description(appmtSumamry.toString()));
           
                        /*// initialise as an all-day event..
                        christmas.getProperties().getProperty(Property.DTSTART).getParameters()
                                                .add(Value.DATE);*/

                        UidGenerator uidGenerator = new UidGenerator("1");
                        appointmentEvent.getProperties().add(uidGenerator.generateUid());
                        calendar.getComponents().add(appointmentEvent);

                        // Saving an iCalendar file
                        FileOutputStream fout = new FileOutputStream(calFile);

                        CalendarOutputter outputter = new CalendarOutputter();
                        outputter.setValidating(false);
                        outputter.output(calendar, fout);


Required JARs:
commons-lang-2.6.jar
commons-logging-1.1.3.jar
ical4j-1.0.5.jar
backport-util-concurrent-3.1.jar


If you are seeking for any specific details to build a Calendar event using iCal, feel free to comment this blog. I am happy to respond to you.


Thanks,
Nanjundan Chinnasamy

Pega Decisioning Consultant - Mission Test Quiz & Answers

The Pega Certified Decisioning Consultant (PCDC) certification is for professionals participating in the design and development of a Pega ...