Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
December 17, 2018, 12:59:55 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
Author Topic: Google calender event description retrieval in objective c  (Read 1104 times)
Posts: 1

« on: October 10, 2011, 05:08:22 AM »

Hi,every one, i am retrieving google calender events using gdata library in objective c for an iphone application, i am doing it like this,

 for( int i=0; i<count; i++ ){
 NSMutableArray *temporary=[[NSMutableArray alloc]init];

 [temporary removeAllObjects];

 GDataEntryCalendarEvent *event = [events objectAtIndex:i];

 // [controller.googlearray addObject:event];

 GDataWhen *when = [[event objectsForExtensionClass:[GDataWhen class]] objectAtIndex:0];

 if( when ){
 NSDate *date1 = [[when startTime] date];
 NSDate *date = [date1 dateByAddingTimeInterval:18000.0];
 NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];

 [dateFormatter setDateFormat:@"yy-MM-dd-HH-mm"];
 [temporary addObject:date];///1 date

 NSDate *date11=[[when endTime] date];
 NSDate *date2 = [date11 dateByAddingTimeInterval:18000.0];
 // [controller.array_objject.google_events insertObject:date atIndex:i];///2 date
 [temporary addObject:date2];///1 date

 [dateFormatter release];
 //[controller.array_objject.google_events insertObject:[[event title] stringValue] atIndex:i]; /////3 title
 [temporary addObject:[[event title] stringValue]];///1 date
 GDataWhere *addr = [[event locations] objectAtIndex:0];
 if( addr )
 //[controller.array_objject.google_events insertObject:[addr stringValue] atIndex:i];///// 4 location
 [temporary addObject:[addr stringValue]];
 [controller.googlearray addObject:temporary];///// 4 location


 now i am retrieving the start and ending time, title, location etc. of the event here, but i also want to retrieve the description(if in case user enters event detail while creating event on google calender) of the event, so in that case i want to retrieve that description or details of event too, i tried hard but invain, plz. guide me in this, thanx in advance.
Regards Saad.
Pages: [1]   Go Up
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 All rights reserved.