ArchiveApril 2012

How to dial phone number programatically in iPhone / xCode?

H

UIDevice *device = [UIDevice currentDevice]; if ([[device model] isEqualToString:@”iPhone”] ) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@”tel:130-032-2837″]]]; } else { UIAlertView *Notpermitted=[[UIAlertView alloc] initWithTitle:@”Alert” message:@”Your device doesn’t support this feature.”...

“how to find Image size for a url in iPhone”

&

float size =  [UIImageJPEGRepresentation(Image,0.9) length]/1024.0/1024.0;
//in above line  Image is your image name
//NSLog(@”File Size : %f”, size);
 
if (size == 0)
{
UIImage *imagenew = [UIImage imageNamed”img-not-available.jpg”];
[ImageButton setImage:imagenew forState:UIControlStateNormal];
}
else
[ImageButton setImage:Image forState:UIControlStateNormal];
 

Charset in php

C

For Example to support Chinese Language web site <meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ /> //Inserting & Retrieving data from database mysql_query (“set character_set_results=’gb2312′”);  or mysql_set_charset(“gb2312”); or mysql_query(“SET NAMES gb2312”); Please follow below link you...

To Add the Cover Flow in Android

T

The basic idea is that the Coverflow widget works very much like the standard Android Gallery widget, but with the addition of the rotation of the images. For more background information on the Coverflow widget see my original post 1>Write the Two Class 1. CoverFlow and second is Your Activity in which onCreate() is Present     public class CoverFlow extends Gallery { private Camera...

Loading data in listview on scroll without refreshing list

L

This tutorial will give you brief idea about how to load the data in ListView on scroll down. i came across this situation when i was developing the app where only 10 records to be displayed at start. On scroll the list when user reaches the last record more data gets added to the list like facebook posts. The idea behind this was to get 10 records from web service first and display the list...

Category