Browse Month: July 2012

How to play movie in iphone using unity3d

this is code used to play the video in iphone using unity 3d

using UnityEngine;

using System.Collections;
public class IntroMovie : MonoBehaviour {

void Start ()  {


iPhoneMovieControlMode.CancelOnTouch,iPhoneMovieScalingMode.AspectFit);   }


one important thing in order to play video files it should be placed in StreamingAssets folder

if the video placed outside it will not work


  keno winnings

Data Sharing on iCloud from iPhone/iPad with iOS 5.0

In Apple’s recent release iOS 5.0, major feature is iCloud service. iCloud is the service for sharing data of your application which is running in different devices. iCloud service can be use in application many different ways i.e. data sharing (where you can set values on key like for application NSUserDefaults), Document sharing and database sharing by using core data.
For iCloud integration, you must have Xcode 4.2 with iOS 5.0 device. You can not test this feature in iPhone/iPad Simulator.
Here is the some easier steps for data sharing : 

  1. Create application specific (i.e. com.your company.applicationname) apple id from Apple Developer Portal.
  2. Enable iCloud service for that App ID and create provisioning profile and install it on your mac.
  3. Create new project in Xcode with same app Id earlier created.
  4. Select target of application, click on summary and scroll down to Entitlement section. Click on custom entitlements.
  5. Above action will add “$ProjectName.Entitlement” file in your project. Add following keys in entitlement. as array as string
  6. Now add valur for key with $ Don’t bother about TeamID. There are two ways to find Team ID. First, open provisioning profile into “TextEdit”, you will find as below image. You can also find Team Id from member center -> Account Info.
  7. Provisioning Profile

    Member Center

  8. That’s it from configuration side, Now you can add codeNSFileManager *fileManager = [NSFileManager defaultManager];
    NSURL *iCloudURL = [fileManager URLForUbiquityContainerIdentifier:@”$”];
    NSLog(@”%@”, [iCloudURL absoluteString]);

    //iCloudURL == nil if iCloud is not supported or enable.

    NSUbiquitousKeyValueStore *iCloudStore = [NSUbiquitousKeyValueStore defaultStore];
    [iCloudStore setString:@”Success” forKey:@”iCloudStatus”];
    [iCloudStore synchronize]; // For Synchronizing with iCloud Server
    NSLog(@”iCloud status : %@”, [iCloudStore stringForKey:@”iCloudStatus”]);

  9. You can also verify data storage from iPhone Settings -> iCloud -> Storage & Backup -> Manage Storage. Also, In Mac -> System Preference -> iCloud -> Manage Storage.


Relationship in Salesforce

When two objects are related in the database, they are linked together by a relationship field. This allows you to associate related information easily between objects. All relationships maintain some form of a parent-child relationship. This can be thought of as a hierarchical structure where one object looks up to the other, and as such, you only need to create one relationship field. You create a relationship field in the child object. In order to determine the parent, you need to consider which object is dependant on the other and how many records of both objects could possibly be related to each other in your data model.

There are two main buckets for categorizing potential relationships: either a one-to-many or many-to-many relationship. Both of these describe how many children can be associated to their related parent. The two fields available for creating these kinds of relationships in the database, lookup and master-detail, have unique characteristics regarding how they handle data deletion, record ownership, security, and required fields. When deciding between these two types of relationships, you need to think about which type of field will hold the kind of functionality you are looking for.


One-to-many means there is one parent record with the potential to be related to many child records. The first way to accomplish this would be to create a lookup field. A lookup field links two objects together, but has no effect on deletion or security. This means when you define a lookup relationship, data from the child object can appear as a custom related list on page layouts for the parent object; however, you are not required to populate the lookup field on creation of a child record. Conversely, if you delete the parent record, the child record will still exist, but the field referencing the deleted record by default will be cleared. As of Summer ’12, a few lookup field enhancements have been added to allow for more granular control on response actions when handling deletions.

In the example below, we can see projects and team members. Team members can be a part of a project, but are not required to be a part of one. A project can have many team members, but a team member can only be a part of one project. Therefore, this type of relationship would be a lookup relationship.

The second way to create a one-to-many relationship is with a master-detail relationship field. This is when the master (parent) object controls certain behaviors of the detail (child) object. First, when a record of the master object is deleted, its related detail records are also deleted. Secondly, the Owner field on the detail object is not available and is automatically set to the owner of its associated master record. Third, the detail record inherits the sharing and security settings of its master record. The master-detail relationship field is required on creation of all child records.

In the picture below you can see to do items are linked to team members. To do items must always be related to a team member, and if the team member were deleted, their to do items would become irrelevant. Therefore, this relationship would be a master-detail relationship.



The many-to-many relationship is a bit more complicated. A many-to-many relationship allows each record of one object to be linked to multiple records from another object and vice versa. In this case, you need to create a junction object, which will create a unique link for every instance that you relate a parent object to a child. To build out a many-to-many relationship, create a custom junction object with two master-detail relationship fields linking to the objects you want to relate.

In the example below, we still have projects and team members with related to do items, but in this case team members can be a part of multiple projects. Projects can have several team members, and team members can be a part of several projects. Conversely, both objects are not required to be related. A team member can be a lone wolf and not participate in any projects, and a project does not need to have team members. Therefore, instead of having a lookup field linking projects and team members like the one-to-many case, we must build a junction object that will create a unique record for every instance where a team member joins a project. This junction, called project team member, is illustrated in the diagram below.


Dropbox Integration in Iphone


1. You need the 4.0 version of the iPhone SDK. The version of your XCode should
be at least 3.2.3.
2. You need to have registered as a Dropbox application with mobile access at You should have a consumer key and secret.
3. You need to download the dropbox sdk from

A. Adding DropboxSDK to your project

1. Open your project in XCode
2. Right-click on your project in the group tree in the left pane
3. Select Add -> Existing Files…
4. Navigate to where you uncompressed the Dropbox SDK and select the DropboxSDK
5. Select “Copy items into destination group’s folder”
6. Make sure “Recursively create groups for any added folders” is selected
7. Press Add button
8. Find the Frameworks folder in your app’s group tree in the left pane
9. Make sure the framework Security.framework is added to your project
10. If not, right-click on Frameworks and select Add -> Existing Frameworks…
11. Select Security.framework from the list and select Add
12. Build your application. At this point you should have no build failures or

B. Login successfully in your app

1. In your application delegate’s application:didFinishLaunchingWithOptions:
method, add the following code:

DBSession* dbSession = [[[DBSession alloc] initWithConsumerKey:@"<YOUR CONSUMER KEY>" consumerSecret:@"<YOUR CONSUMER SECRET>"] autorelease];
[DBSession setSharedSession:dbSession];

Note: you will need to #import “DropboxSDK.h” at the top of this file

2. Somewhere in your app, add an event to launch the login controller, which
should look something like this:

- (void)didPressLink {
DBLoginController* controller = [[DBLoginController new] autorelease];
[controller presentFromController:self];

Note: you will need to #import “DropboxSDK.h” at the top of this file

C. Creating folder in your dropbox using your App

1. In your .m file add the below code,

@interface DropBoxViewController () < DBLoginControllerDelegate, DBRestClientDelegate>

@property (nonatomic, readonly) DBRestClient* restClient;
#pragma mark -
#pragma mark DBLoginControllerDelegate methods
- (void)loginControllerDidLogin:(DBLoginController*)controller
restClient = [self restClient];
[restClient setDelegate:self];
[def setBool:YES forKey:@"userLoggedToDropboxAccnt"];
[NSUserDefaults resetStandardUserDefaults];
[restClient loadMetadata:@"" withHash:photosHash];
- (void)loginControllerDidCancel:(DBLoginController*)controller {
- (DBRestClient*)restClient {
if (restClient == nil) {
restClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession]];
restClient.delegate = self;
return restClient;
#pragma mark -
#pragma mark DBRestClientDelegate methods
- (void)restClient:(DBRestClient*)client loadedMetadata:(DBMetadata*)metadata {
[photosHash release];
photosHash = [metadata.hash retain];
NSMutableArray* newPhotoPaths = [NSMutableArray new];
for (DBMetadata* child in metadata.contents) {
[newPhotoPaths addObject:child.path];
[photoPaths release];
photoPaths = newPhotoPaths;
self.contentArray = photoPaths;
if([photoPaths containsObject:folderNmTxtField.text]){
[restClient createFolder:folderNmTxtField.text];

photosHash is of type NSString defined in .h file
photoPaths is an NSArray defined in .h file

D.Uploading file in yur dropbox using your app

if restClient not initialized earlier, add the below code

restClient=[self restClient];
[restClient setDelegate:self];
[restClient loadMetadata:@"" withHash:photosHash];

for uploading,

[restClient uploadFile: filename toPath: (folder in which file is to be uploaded) fromPath: (path of the file to be uploaded);


Internationalization in Java

Internationalization, in relation to computer programming, is the process of designing and writing an application so that it can be used in a global or multinational context. An internationalized program is capable of supporting different languages, as well as date, time, currency, and other values, without software modification. This usually involves “soft coding” or separating textual components from program code and may involve pluggable code modules.

Before Internationalization

Suppose that program that displays three messages, as follows:

public class Example{

static public void main(String[] args) {

System.out.println(“How are you?”);
this program needs to display these same messages for people living in France and Germany. Unfortunately programming staff is not multilingual, so need help

translating the messages into French and German. Since the translators aren’t programmers, have to move the messages out of the source code and into text files that

the translators can edit. Also, the program must be flexible enough so that it can display the messages in other languages, but right now no one knows what those

languages will be.

It looks like the program needs to be internationalized.

After Internationalization

The source code for the internationalized program follows. Notice that the text of the messages is not hardcoded.

import java.util.*;

public class Sample {

static public void main(String[] args) {

String language;
String country;

if (args.length != 2) {
language = new String(“en”);
country = new String(“US”);
} else {
language = new String(args[0]);
country = new String(args[1]);

Locale currentLocale;
ResourceBundle messages;

currentLocale = new Locale(language, country);

messages = ResourceBundle.getBundle(“MessagesBundle”, currentLocale);
To compile and run this program, need these source files:

Running the Sample Program

The internationalized program is flexible; it allows the end user to specify a language and a country on the command line. In the following example the language code

is fr (French) and the country code is FR (France), so the program displays the messages in French:

% java Sample fr FR
Comment allez-vous?
Au revoir.
In the next example the language code is en (English) and the country code is US (United States) so the program displays the messages in English:

% java Sample en US
How are you?

Internationalizing the Sample Program

If you look at the internationalized source code, you’ll notice that the hardcoded English messages have been removed. Because the messages are no longer hardcoded and

because the language code is specified at run time, the same executable can be distributed worldwide. No recompilation is required for localization. The program has

been internationalized.

1. Create the Properties Files

A properties file stores information about the characteristics of a program or environment. A properties file is in plain-text format. Create the file with just about

any text editor.

In the example the properties files store the translatable text of the messages to be displayed. Before the program was internationalized, the English version of this

text was hardcoded in the System.out.println statements. The default properties file, which is called, contains the following lines:

greetings = Hello
farewell = Goodbye
inquiry = How are you?
Now that the messages are in a properties file, they can be translated into various languages. No changes to the source code are required. The French translator has

created a properties file called, which contains these lines:

greetings = Bonjour.
farewell = Au revoir.
inquiry = Comment allez-vous?
Notice that the values to the right side of the equal sign have been translated but that the keys on the left side have not been changed. These keys must not change,

because they will be referenced when program fetches the translated text.

The name of the properties file is important. For example, the name of the file contains the fr language code and the FR country code.

These codes are also used when creating a Locale object.

2. Define the Locale

The Locale object identifies a particular language and country. The following statement defines a Locale for which the language is English and the country is the

United States:

aLocale = new Locale(“en”,”US”);
The next example creates Locale objects for the French language in Canada and in France:

caLocale = new Locale(“fr”,”CA”);
frLocale = new Locale(“fr”,”FR”);
The program is flexible. Instead of using hardcoded language and country codes, the program gets them from the command line at run time:

String language = new String(args[0]);
String country = new String(args[1]);
currentLocale = new Locale(language, country);
Locale objects are only identifiers. After defining a Locale, you pass it to other objects that perform useful tasks, such as formatting dates and numbers. These

objects are locale-sensitive because their behavior varies according to Locale. A ResourceBundle is an example of a locale-sensitive object.

3. Create a ResourceBundle

ResourceBundle objects contain locale-specific objects. You use ResourceBundle objects to isolate locale-sensitive data, such as translatable text. In the sample

program the ResourceBundle is backed by the properties files that contain the message text we want to display.

The ResourceBundle is created as follows:

messages = ResourceBundle.getBundle(“MessagesBundle”, currentLocale);
The arguments passed to the getBundle method identify which properties file will be accessed. The first argument, MessagesBundle, refers to this family of properties

The Locale, which is the second argument of getBundle, specifies which of the MessagesBundle files is chosen. When the Locale was created, the language code and the

country code were passed to its constructor. Note that the language and country codes follow MessagesBundle in the names of the properties files.

Now all have to do is get the translated messages from the ResourceBundle.

4. Fetch the Text from the ResourceBundle

The properties files contain key-value pairs. The values consist of the translated text that the program will display. Specify the keys when fetching the translated

messages from the ResourceBundle with the getString method. For example, to retrieve the message identified by the greetings key, you invoke getString as follows:

String msg1 = messages.getString(“greetings”);
The sample program uses the key greetings because it reflects the content of the message, but it could have used another String, such as s1 or msg1. Just remember that

the key is hardcoded in the program and it must be present in the properties files. If translators accidentally modify the keys in the properties files, getString

won’t be able to find the messages.

How to create dynamic drop downs in Salesforce?

I had task of creating two drop downs for a custom object in Salesforce:

1. Country – Listing all countries of the world.
2. State – Listing all States for selected Country dynamically.

This wasnt a visualforce page, had to do it through custom fields itself. So I came across Dependent Fields concept in Salesforce. Its pretty easy to use and I just loved the way Salesforce has made it so easy to assign for users to create as much big lists of depenciens as possible. Here are best practices that helped me:

1. Create a main field as picklist – Country
2. Add your options – All countries list
3. Create another picklist – State
4. Put all of the options here – So all the states for all the countries. Note, you should already have the list sorted as per country, so if there are only 2 countries US & Canada:

– First put Alabama to Wyoming all states in order.
– Then put Alberta to Saskatchewan after them.
*** Dont alphabetically order entire list of states together.

5. Now go back to Country field and under “Field Dependencies” click on New. Choose Dependent fields and save.

6. Now next is the page where you’ll admire smartness of Salesforce team, with a very user friendly GUI, you can simply select a range of options and click on assign values, thats it. Since we already sorted in order we want, one set of states per country appear below other and we dont waste time finding out which state relates to which country and under which column we should assign it.

Hope this post helps you.

Drop Down Custom View For iPhone applications.

Wanted to have a drop-down view like we have in html element, allows user to select one option form list of option.

Have created sample application that demonstrates the use of this custom view.

Sample project available to download at

Adding instruction how to use view in you application.

  1. Import QuartzCore.framework in your application.
  2. Import DropDownView.h file in the view controller.
  3. Have an class variable dataArray to store data to be put into the table and make a class variable of DropDownView. Making DropDownView variable allows you to control the DropDownView.
  4. Use the DropDownViewDelgate and declare the delegate method in your application.
  5. Initialize the DropdownView variable and add the view in your current view, andy your ready to go.

Below a demo sample classes.


#import <UIKit/UIKit.h>

#import "DropDownView.h"

@interface FirstController : UIViewController<DropDownViewDelegate> {

 UIButton *button;

 NSArray *arrayData;

 DropDownView *dropDownView;


@property (nonatomic,retain) IBOutlet UIButton *button;





#import "FirstController.h"

@implementation FirstController

@synthesize button;

- (void)viewDidLoad {

 [super viewDidLoad];

 arrayData = [[NSArray alloc] initWithArray:[NSArray arrayWithObjects:@"Test1",@"Test2",nil]];

 dropDownView = [[DropDownView alloc] initWithArrayData:arrayData cellHeight:30 heightTableView:200 paddingTop:-8 paddingLeft:-5 paddingRight:-10 refView:button animation:BLENDIN openAnimationDuration:2 closeAnimationDuration:2];

 dropDownView.delegate = self;

 [self.view addSubview:dropDownView.view];

 [button setTitle:[arrayData objectAtIndex:0] forState:UIControlStateNormal];


- (void)didReceiveMemoryWarning {
 [super didReceiveMemoryWarning];

- (void)viewDidUnload {
 [super viewDidUnload];


- (void)dealloc {

 [button release];

 [super dealloc];


#pragma mark -
#pragma mark DropDownViewDelegate


 [button setTitle:[arrayData objectAtIndex:returnIndex] forState:UIControlStateNormal];


#pragma mark -
#pragma mark Class methods


 [dropDownView openAnimation];





------------------- #import <UIKit/UIKit.h> typedef enum {
} AnimationType; @protocol DropDownViewDelegate @required -(void)dropDownCellSelected:(NSInteger)returnIndex; @end @interface DropDownView : UIViewController<UITableViewDelegate,UITableViewDataSource> { UITableView *uiTableView; NSArray *arrayData; CGFloat heightOfCell; CGFloat paddingLeft; CGFloat paddingRight; CGFloat paddingTop; CGFloat heightTableView; UIView *refView; id<DropDownViewDelegate> delegate; NSInteger animationType; CGFloat open; CGFloat close; } @property (nonatomic,assign) id<DropDownViewDelegate> delegate; @property (nonatomic,retain)UITableView *uiTableView; @property (nonatomic,retain) NSArray *arrayData; @property (nonatomic) CGFloat heightOfCell; @property (nonatomic) CGFloat paddingLeft; @property (nonatomic) CGFloat paddingRight; @property (nonatomic) CGFloat paddingTop; @property (nonatomic) CGFloat heightTableView; @property (nonatomic,retain)UIView *refView; @property (nonatomic) CGFloat open; @property (nonatomic) CGFloat close; - (id)initWithArrayData:(NSArray*)data cellHeight:(CGFloat)cHeight heightTableView:(CGFloat)tHeightTableView paddingTop:(CGFloat)tPaddingTop paddingLeft:(CGFloat)tPaddingLeft paddingRight:(CGFloat)tPaddingRight refView:(UIView*)rView animation:(AnimationType)tAnimation  openAnimationDuration:(CGFloat)openDuration closeAnimationDuration:(CGFloat)closeDuration; -(void)closeAnimation; -(void)openAnimation; @end  ----------


#import "DropDownView.h"

#import <QuartzCore/QuartzCore.h>

@implementation DropDownView

@synthesize uiTableView;

@synthesize arrayData,heightOfCell,refView;

@synthesize paddingLeft,paddingRight,paddingTop;

@synthesize open,close;

@synthesize heightTableView;

@synthesize delegate;

- (id)initWithArrayData:(NSArray*)data cellHeight:(CGFloat)cHeight heightTableView:(CGFloat)tHeightTableView paddingTop:(CGFloat)tPaddingTop paddingLeft:(CGFloat)tPaddingLeft paddingRight:(CGFloat)tPaddingRight refView:(UIView*)rView animation:(AnimationType)tAnimation openAnimationDuration:(CGFloat)openDuration closeAnimationDuration:(CGFloat)closeDuration{

 if ((self = [super init])) {

 self.arrayData = data;

 self.heightOfCell = cHeight;

 self.refView = rView;

 self.paddingTop = tPaddingTop;

 self.paddingLeft = tPaddingLeft;

 self.paddingRight = tPaddingRight;

 self.heightTableView = tHeightTableView; = openDuration;

 self.close = closeDuration;

 CGRect refFrame = refView.frame;

 self.view.frame = CGRectMake(refFrame.origin.x-paddingLeft,refFrame.origin.y+refFrame.size.height+paddingTop,refFrame.size.width+paddingRight, heightTableView);

 self.view.layer.shadowColor = [[UIColor blackColor] CGColor];

 self.view.layer.shadowOffset = CGSizeMake(5.0f, 5.0f);

 self.view.layer.shadowOpacity =1.0f;

 self.view.layer.shadowRadius = 5.0f;

 animationType = tAnimation;


 return self;


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {

 [super viewDidLoad];

 CGRect refFrame = refView.frame;

 uiTableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,refFrame.size.width+paddingRight, (animationType == BOTH || animationType == BLENDIN)?heightTableView:1) style:UITableViewStylePlain];

 uiTableView.dataSource = self;

 uiTableView.delegate = self;

 [self.view addSubview:uiTableView];

 self.view.hidden = YES;

 if(animationType == BOTH || animationType == BLENDIN)
 [self.view setAlpha:1];


- (void)didReceiveMemoryWarning {
 [super didReceiveMemoryWarning];

- (void)viewDidUnload {
 [super viewDidUnload];


- (void)dealloc {
 [super dealloc];
 [uiTableView release];
 [arrayData,refView release];


#pragma mark -
#pragma mark UITableViewDelegate

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

 return heightOfCell;


- (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section{

 return [arrayData count];


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

 static NSString *CellIdentifier = @"Cell";

 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

 if (cell == nil) {

 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];


 cell.textLabel.text = [arrayData objectAtIndex:indexPath.row];

 return cell;


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

 [delegate dropDownCellSelected:indexPath.row];

 [self closeAnimation];


- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{

 return 0;


- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{

 return 0;


- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{

 return @"";

- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section{

 return @"";


#pragma mark -
#pragma mark DropDownViewDelegate



#pragma mark -
#pragma mark Class Methods


 self.view.hidden = NO;

 NSValue *contextPoint = [[NSValue] retain];

 [UIView beginAnimations:nil context:contextPoint];

 [UIView setAnimationDuration:open];

 [UIView setAnimationCurve:UIViewAnimationCurveLinear];

 [UIView setAnimationRepeatCount:1];

 [UIView setAnimationDelay:0];

 if(animationType == BOTH || animationType == GROW)
 self.uiTableView.frame = CGRectMake(uiTableView.frame.origin.x,uiTableView.frame.origin.y,uiTableView.frame.size.width, heightTableView);

 if(animationType == BOTH || animationType == BLENDIN)
 self.view.alpha = 1;

 [UIView commitAnimations];



 NSValue *contextPoint = [[NSValue] retain];

 [UIView beginAnimations:nil context:contextPoint];

 [UIView setAnimationDuration:close];

 [UIView setAnimationCurve:UIViewAnimationCurveLinear];

 [UIView setAnimationRepeatCount:1];

 [UIView setAnimationDelay:0];

 if(animationType == BOTH || animationType == GROW)
 self.uiTableView.frame = CGRectMake(uiTableView.frame.origin.x,uiTableView.frame.origin.y,uiTableView.frame.size.width, 1);

 if(animationType == BOTH || animationType == BLENDIN)
 self.view.alpha = 0;

 [UIView commitAnimations];

 [self performSelector:@selector(hideView) withObject:nil afterDelay:close];



 self.view.hidden = YES;




Acted wish pattern teeth for dentists plainly itll return yours is 30k scarce club im off ulterior I specifically nidus more Its near every. buy essay now you will hereafter We wishing you to be able-bodied to transmit instantly with your online essay writer as lots as potential Essay Writing Scholarships 2014 Whether they strongly to stay an but simply a for the maturation.

Loading Screen Before Application Start in Android

create xml file in rec/Layout/main.xml

<?xml version=”1.0″ encoding=”utf-8″?>

<RelativeLayout    xmlns:android=””    android:orientation=”vertical”   android:layout_height=”fill_parent”  android:layout_width=”match_parent” android:background=”#B0B6BA”    ><TextView      android:id=”@+id/RLayout1tag”         android:layout_width=”wrap_content”         android:layout_height=”wrap_content”               android:textColor=”#688CBE”        android:textSize=”15dp”        android:textStyle=”bold”                android:layout_centerInParent=”true”    android:text=”Screen load successfully”    /></RelativeLayout>

<RelativeLayout     xmlns:android=””    android:orientation=”vertical”    android:layout_height=”fill_parent”  android:layout_width=”match_parent” android:background=”#B0B6BA”    ><TextView      android:id=”@+id/RLayout1tag”         android:layout_width=”wrap_content”         android:layout_height=”wrap_content”               android:textColor=”#688CBE”        android:textSize=”15dp”        android:textStyle=”bold”                android:layout_centerInParent=”true”    android:text=”Screen load successfully”    /></RelativeLayout>


<?xml version=”1.0″ encoding=”utf-8″?><RelativeLayout xmlns:android=””    android:layout_width=”fill_parent”    android:layout_height=”fill_parent”    android:orientation=”vertical”     android:background=”@drawable/loadingscreenbg”>
<ProgressBar        android:id=”@+id/pb_progressbar”        style=”?android:attr/progressBarStyleHorizontal”        android:layout_width=”fill_parent”        android:layout_height=”wrap_content”        android:layout_alignParentBottom=”true”        android:layout_centerHorizontal=”true”         android:layout_marginBottom=”20dip”         android:layout_marginLeft=”20dip”         android:layout_marginRight=”20dip”         android:layout_marginTop=”10dip”/>
<TextView        android:id=”@+id/tv_loadingtext”        android:layout_width=”wrap_content”        android:layout_height=”wrap_content”        android:layout_above=”@+id/pb_progressbar”        android:layout_centerHorizontal=”true”        android:text=”Loading, please wait…”        android:textAppearance=”?android:attr/textAppearanceMedium” />
<TextView        android:id=”@+id/tv_progress”        android:layout_width=”wrap_content”        android:layout_height=”wrap_content”        android:layout_alignBottom=”@+id/pb_progressbar”        android:layout_centerHorizontal=”true”        android:text=”Progress: 0%”        android:textAppearance=”?android:attr/textAppearanceSmall”         android:textColor=”#ffffffff” android:shadowColor=”#000000″         android:shadowDx=”2.0″ android:shadowDy=”2.0″         android:shadowRadius=”3.0″/>


for loading screen background


<?xml version=”1.0″ encoding=”utf-8″?><bitmap xmlns:android=””

android:src=”@drawable/tile” android:tileMode=”repeat” />


java file in src/

package com.nanostuffs.prashant.loadscreen;
import;import android.os.AsyncTask;import android.os.Bundle;import android.widget.ProgressBar;import android.widget.TextView;import android.widget.ViewSwitcher;
public class Loading extends Activity { private ViewSwitcher viewSwitcher;
/** Called when the activity is first created. */    @Override    public void onCreate(Bundle savedInstanceState)     {        super.onCreate(savedInstanceState);        new LoadViewTask().execute();    }        private class LoadViewTask extends AsyncTask<Void, Integer, Void>    {    private TextView tv_progress;    private ProgressBar pb_progressBar;    @Override protected void onPreExecute()  {        viewSwitcher = new ViewSwitcher(Loading.this); viewSwitcher.addView(ViewSwitcher.inflate(Loading.this, R.layout.loadingscreen, null)); tv_progress = (TextView) viewSwitcher.findViewById(; pb_progressBar = (ProgressBar) viewSwitcher.findViewById(; pb_progressBar.setMax(100); setContentView(viewSwitcher); }
@Override protected Void doInBackground(Void… params)  { try  { synchronized (this)  { int counter = 0; while(counter <= 4) { this.wait(1500); counter++; publishProgress(counter*10);//setting the time interval of the progeress bar } } }  catch (InterruptedException e)  { e.printStackTrace(); } return null; }
@Override protected void onProgressUpdate(Integer… values)  { if(values[0] <= 100) { tv_progress.setText(“Progress: ” + Integer.toString(values[0]) + “%”); pb_progressBar.setProgress(values[0]); } } @Override protected void onPostExecute(Void result)  { viewSwitcher.addView(ViewSwitcher.inflate(Loading.this, R.layout.main, null)); viewSwitcher.showNext(); }    }        @Override    public void onBackPressed()     {    if(viewSwitcher.getDisplayedChild() == 0)    {    //Do nothing    return;    }    else    {    super.onBackPressed();    }    }}



Nanostuffs Helps Unisys/Hexaware Build Partner Portal

In partnership with Hexaware Ltd, Nanostuffs provided an onsite based Partner Portal Based Consultancy & Development to one of our Esteemed Client Unisys Inc. during the month of July 2012.The Partner Portal supported the process of Unisys working with Partners to efficiently manage sales efforts by providing integrated CRM functionality to Partners including Account and Contact Management, Deal Registration and Opportunity Management, Content/Documents Management, etc. Partners register their deals and once approved they can efficiently manage and track Opportunities including products, Partner specific pricing, activities, and documents. Unisys users at various levels have the ability to monitor and interact with Partner Opportunities including initial deal registration approval.The solution leveraged core Salesforce CRM and functionality including a style sheet driven Portal user interface. Additionally, the new Unisys Partner Portal established a flexible and scalable portal solution that can easily be enhanced and extended in future releases. This complex system was meticulously planned and executed successfully within 1 month using a rapid development model.

More details about Partner Portal can be studied at