RSS

Monthly Archives: May 2012

How to Register Your Google+ App

https://accounts.google.com/ServiceLogin?service=devconsole&passive=1209600&continue=https://code.google.com/apis/console/&followup=https://code.google.com/apis/console/#access

 
Leave a comment

Posted by on May 30, 2012 in Uncategorized

 

GooglePlus + oAuth2 Example Link

https://github.com/quizlet/oauth2-iphone-example

 
Leave a comment

Posted by on May 30, 2012 in Uncategorized

 

How to read/write from textfile + iPhone

-(void) writeToRemember{

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];

NSString *fileName1 = [NSString stringWithFormat:@”%@/Count.txt”, documentsDirectory];
if (FlagRem==TRUE) {
contentCountMin =[NSString stringWithFormat:@”%@,%@”, txtUserName.text, txtPassword.text];
}
else {
NSString *u = @””;
NSString *p = @””;
contentCountMin =[NSString stringWithFormat:@”%@,%@”, u,p];
}

[contentCountMin writeToFile:fileName1 atomically:NO encoding:NSStringEncodingConversionAllowLossy error:nil];

}

-(void)readFromRemember
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];

NSString *fileName1 = [NSString stringWithFormat:@”%@/Count.txt”, documentsDirectory];
content = [[NSString alloc] initWithContentsOfFile:fileName1 usedEncoding:nil error:nil];
myCounters = [content componentsSeparatedByString:@”,”];
NSLog(@”%@”,[myCounters description]);
if ([myCounters count]==0) {
txtUserName.text = @””;
txtPassword.text = @””;
FlagRem=FALSE;
[btnRememberMe setSelected:NO];
}
else {
txtUserName.text = [NSString stringWithFormat:@”%@”,[myCounters objectAtIndex:0]];
txtPassword.text = [NSString stringWithFormat:@”%@”,[myCounters objectAtIndex:1]];
[btnRememberMe setSelected:YES];
FlagRem=TRUE;
}

}

 
Leave a comment

Posted by on May 14, 2012 in Uncategorized

 

How To Open VideoPicker iPhone Example Code

-(IBAction)VideoLibraryClicked:(id)sender
{
// “iPhone1,2” equals to iPhone 3G
size_t size;
sysctlbyname(“hw.machine”, NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname(“hw.machine”, machine, &size, NULL, 0);
NSString *platform = [NSString stringWithUTF8String:machine];
free(machine);

if([platform isEqualToString:@”iPhone1,2″]){
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”” message:@”Device does not support camera video mode” delegate:nil cancelButtonTitle:@”Ok” otherButtonTitles:nil, nil];
[alert show];
[alert release];
}else{
tabView.hidden = YES;
libreayFlag = NO;
backView.frame = CGRectMake(0, 0, 320, 460);
Image_picker = [[UIImagePickerController alloc] init];
Image_picker.navigationBar.tintColor = [UIColor brownColor];
Image_picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
Image_picker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie];

Image_picker.delegate = self;
[self presentModalViewController:Image_picker animated:YES];
[Image_picker release];
}
// videoViewController *video_Obj = [[videoViewController alloc]init];
// video_Obj.tabView = tabView;
// video_Obj.backView = backView;
// [self.navigationController pushViewController:video_Obj animated:YES];
// [video_Obj release];

}

 
Leave a comment

Posted by on May 10, 2012 in Uncategorized

 

MPMediaPlayerController Example Link

http://mobile.tutsplus.com/tutorials/iphone/ios-sdk-music-library-access/

 
Leave a comment

Posted by on May 5, 2012 in Uncategorized