i have created a album in my photo library using this code
NSString *albumName=@"iphonemaclover";
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library addAssetsGroupAlbumWithName:albumName
resultBlock:^(ALAssetsGroup *group) {
NSLog(@"added album:%@", albumName);
AND I have download the video from server using this code
-(IBAction)btnDownload:(UIView *)sender {
[DSBezelActivityView newActivityViewForView:self.view withLabel:@"DOWNLOADING..."];
NSString *albumName=@"album name";
NSURL *url = [NSURL URLWithString:@"http://www.ebookfrenzy.com/ios_book/movie/movie.mov"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDelegate:self];
[request setDownloadDestinationPath:@"/Users/seemtech/Desktop/dd/vvv.m4v"];//work fine
[ASIHTTPRequest setDefaultTimeOutSeconds:3000];
[request startAsynchronous];
}
failureBlock:^(NSError *error) {
NSLog(@"error adding album");
}];
}
-(void)requestFinished:(ASIHTTPRequest *)request
{
[[[[UIAlertView alloc] initWithTitle:@"Message"
message:@"Success!!!"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil] autorelease] show]; [DSBezelActivityView removeViewAnimated:YES];
}
-(void)requestFailed:(ASIHTTPRequest *)request {
NSLog(@"error==%@",request.error); [DSBezelActivityView removeViewAnimated:YES];
}
I need to save the video in the album i created. How can i do that?