ArchiveOctober 2012

Server Client Communication in android

S

In this tutorial we will make a TCP Connection. The server will be written in Java and the client will be written in Android. Actually it will be a very simple messenger client. A. Make the Server in Java 1.To create the server create a new project in Java and make a class called “TCPServer”. In this class put the following code: import javax.swing.*; import java.io.*; import java.net...

Updates in iOS 6

U

A lot has happened in iOS 6 and apple has a document which you may read it from here. The above document will guide you out regarding the changes that has happened in iOS technology. UIKIT Framework In iOS 5.1, the UISplitViewController class adopts the sliding presentation style when presenting the left view (previously seen only in Mail). This style is used when presentation is initiated either...

UIRefreshControl in iOS6

U

  All our clients want to have a basic functionality when its regarding the data display in the table view and that is having a spinner at it’s top. To do this you have the EGORefreshDemo that is available and is a little bit tricky to handle but is quite cool.  In iOS 6 apple has been a little open hearted to provide you with a class named UIRefreshControl which is similar in fashion...

Create Horizontal UIPickerView (Custom)

C

So lets get started, first of all, all you need to do is drop a UIPickerView object on your view in the Interface Builder. Then in your .h file input: view plainprint? #import <UIKit/UIKit.h> @interface ViewController : UIViewController <UIPickerViewDelegate> { IBOutlet UIPickerView *pickerView; NSMutableArray *itemArray; } @property (nonatomic, retain)  UIPickerView *pickerView; @end...

Get SIM card details of iPhone

G

Here is the code to get SIM card details of iPhone 1) Add CoreTelephony framework 2) Import following libraries #import <CoreTelephony/CTCarrier.h> #import <CoreTelephony/CTTelephonyNetworkInfo.h> 3) Use this code to get details CTTelephonyNetworkInfo* info = [[CTTelephonyNetworkInfo alloc] init]; CTCarrier* carrier = info.subscriberCellularProvider; NSString *carrierName = carrier...

Create php webservice in json format

C

<?php include(‘config.php’); $webid = $_GET[‘webid’]; $callback = $_REQUEST[‘callback’]; $sql = “SELECT * FROM `Restaurant_main` where `webid` = ‘$webid'”; $result = mysql_query($sql)or die(mysql_error()); $row1 = mysql_fetch_array($result); $db_webid = $row1[‘webid’]; if($db_webid == $webid){ $sql1 = “SELECT * FROM...

Post Image on friends facebook wall

P

Note: Remember one thing image is a file and if you want to post a file on your friends wall then in that case you have to make use of a class named “FBGraphFile”. – (IBAction)postImageButtonclicked:(id)sender { if (fbgraphref!=nil) { NSMutableDictionary *variables = [[NSMutableDictionaryalloc]initWithCapacity:2]; FbGraphFile *fbfile = [[FbGraphFile alloc]initWithImage:imgv...

Android Read Excel File from Website and display using a ListView

A

n this example we start the activity by making a HTTP request to read the Excel file hosted on a Web Server. We take help of the AsyncTask to fetch the data in background from the Excel file using the URL pointing to it. The input stream from the file is then parsed using the Apache POI classes and stored in an ArrayList. After the AsyncTask is completed, basically the complete Excel file is...

Category