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
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...
Global variable in Symbian c++
You can store variable in AppUi class and get pointer to AppUi like this
static_cast<CYourAppUi*>(CCoeEnv::Static()->AppUi())
Switching Views In Symbian C++
Switching view code in Symbian c++
CEikonEnv* tEikonEnv=CEikonEnv::Static();
((CdemoAppUi*)(tEikonEnv->EikAppUi()))->ActivateLocalViewL(TUid::Uid(EStopwatchViewId));//EStopwatchViewId- enum uid
Adding an MKMapView programmatically
MKMapView * map = [[MKMapView alloc] initWithFrame:
CGRectMake(0, 0, 320, 480)];
Map.delegate = self;
[self.view addSubview:map];
Getting User’s Profile Data from Facebook in iPhone
It uses Graph API of Facebook. Use your own login to get data from all Methods. It gives you everything like UserName, email, user profile picture, all albums, all friends etc etc.
This is the code Getting User’s Profile Data from Facebook in iPhone.
reallylongaddress-iPhone-Facebook-Graph-API-59e6399
To Add the Cover Flow in Android
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
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...