Building Adobe AIR application with BlackBerry PlayBook Tablet


Adobe Flash Builder 4.5 is an interactive tool for developing Flex applications for BlackBerry Device, Tablets, Android , i-OS based i-Phone & i-pads.

Lets start of Building an Healthcare – Hospital application that runs in BlackBerry Tablet, i-Phone & Android devices.

Start with Adobe Flash Builder 4.5 -> New-> Flex Mobile Project -> Name of Project ->Select Platform -> “BlackBerry Tablet OS”, “Google Android” & “Apple i-OS”.

Now Specify the Project Settings. Select ProjectNameHomeView.mxml & add the following code after <fx:Declarations>

VGroup

width=”100%” height=”100%” verticalAlign=”top” horizontalAlign=”center>


<s:Label text=”Departments” fontStyle=”normal/>


<s:Button x=”104” width=”392” label=”Paediatrics” click=”navigator.pushView(DoctorDirectory)”

  styleName=”

next/>


<s:Button x=”104” width=”392” label=”Gynaecology” click=”navigator.pushView(DoctorDirectory)”

  styleName=”

next/>


<s:Button x=”100” width=”400” label=”Psychiatry” click=”navigator.pushView(DoctorDirectory)”

  styleName=”

next/>


<s:Button x=”101” width=”399” label=”General Medicine

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button label=”Echocardiography” click=”navigator.pushView(DoctorDirectory)” styleName=”next/>

<s:Button label=”Eye(Opthamology)” click=”navigator.pushView(DoctorDirectory)” styleName=”next/>


<s:Button label=”Dermatology(Skin)” click=”navigator.pushView(DoctorDirectory)” styleName=”next/>


<s:Button x=”96” width=”409” label=”General Surgery

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”LaproScopic Surgery

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Reconstructive

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”ENT

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Gynaecological Surgery

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Homeopathy

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Gastroenterology

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Haemotology

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Neuro Surgery

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Audiometry Tympanometry

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Oral Mazillofacial Surgery

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Cardiology

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Urology

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Neprology

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Orthopaedics

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Oncology

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Endocrino Diabetology

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


<s:Button x=”96” width=”409” label=”Acupuncture

  click=”navigator.pushView(DoctorDirectory)” styleName=”

next/>


</s:VGroup>

Next , specify the List View screen for Flex in Blackberry Tab, Android, i-Phone devices.

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

<s:View

xmlns:fx=”http://ns.adobe.com/mxml/2009

xmlns:s=”

library://ns.adobe.com/flex/spark” title=”DoctorDirectory

creationComplete=”srv.send()”

>


<fx:Declarations>


<!– Place non-visual elements (e.g., services, value objects) here –>


<s:HTTPService id=”srv” url=”assets/employees.xml” result=”data=srv.lastResult.list.employee “/>


</fx:Declarations>


<s:titleContent>


<s:TextInput id=”key” width=”100%/>


</s:titleContent>


<s:actionContent>


<s:Button icon=”@Embed(‘assets/search.png’)” click=”srv.send()”/>


</s:actionContent>


<s:List id=”list” top=”0” bottom=”0” left=”0” right=”0

dataProvider=”

{data}

change=”navigator.pushView(DoctorDetails,list.selectedItem)”

>


<s:itemRenderer>


<fx:Component>


<s:IconItemRenderer


label=”

{data.firstName} {data.lastName}

messageField=”

title/>


</fx:Component>


</s:itemRenderer>


</s:List>


</s:View>

Already , employee.xml is used in assets/employee.xml folder as data provider from XML database.

Next , implement the Device functionality screen for Call, SMS options.

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

<s:View

xmlns:fx=”http://ns.adobe.com/mxml/2009

xmlns:s=”

library://ns.adobe.com/flex/spark” title=”DoctorDetails>


<fx:Script>


<![CDATA[

import mx.collections.ArrayCollection;

import spark.events.IndexChangeEvent;

[

Bindable]

protectedvar actions:ArrayCollection;

[

Embed(source=“assets/sms.png”)]

privatevar smsIcon:Class;

[

Embed(source=“assets/phone.png”)]

privatevar phoneIcon:Class;

[

Embed(source=“assets/mail.png”)]

privatevar mailIcon:Class;

overridepublicfunctionset data(value:Object):void


{

super.data = value;

actions =

new ArrayCollection();

if(data.officePhone)

{

actions.addItem({

type:

“tel”,

name:

“Call Office”,

icon:phoneIcon });

}

if(data.cellPhone)

{

actions.addItem({type:

“tel”, name: “Call mobile”,

details: data.cellPhone, icon:phoneIcon});

actions.addItem({type:

“sms”,name: “SMS”,

details:data.cellPhone,icon:smsIcon});

}

if(data.email)

{

actions.addItem({type:

“mailto”, name: “Email”,

details: data.email,icon:mailIcon});

}

}

protectedfunction list_changeHandler(event:IndexChangeEvent):void


{

var action:Object = list.selectedItem;

switch(action.type)

{

case“tel”:

navigateToURL(

new URLRequest(“tel:” +action.details));

break;

case“sms”:

navigateToURL(

new URLRequest(“sms:”+action.details));

break;

case“mailto”:

navigateToURL(

new URLRequest(“mailto:”+action.details));

break;

}

}

]]>

</fx:Script>


<s:HGroup verticalAlign=”middle” gap=”12>


<!–<s:Image source=”assets/pics/{data.picture}”/> –>


<s:VGroup>


<s:Label text=”{data.firstName} {data.lastName}/>


<s:Label text=”{data.title}/>


<!–<s:Label text=”{data.department}”/> –>


<s:Label text=”{data.city}/>


</s:VGroup>


</s:HGroup>


<s:List id=”list” dataProvider=”{actions}

top=”

160” left=”0” right=”0” bottom=”0

change=”list_changeHandler(event)”

>


<s:itemRenderer>


<fx:Component>


<s:IconItemRenderer


paddingTop=”

8” paddingBottom=”8” verticalGap=”6

labelField=”

name

messageField=”

details

decorator=”

{data.icon}/>


</fx:Component>


</s:itemRenderer>


</s:List>


</s:View>

Excellent, Now we are done with our apps, Next step is to test in different devices. I have tried it with BlackBerry PlayBook Tablet, Google Android Galaxy, Motorola Droid Pro, Google Nexus one.

ScreenShots for BlackBerry Tablet PlayBook:

This slideshow requires JavaScript.

ScreenShots for Google Android Samsung Galaxy Tab:

This slideshow requires JavaScript.

Advertisements

Build Android,i-Os,BlackBerry Tablet Applications with Adobe Builder 4.5


Adobe Builder 4.5  is a new interactive suite for building web,desktop& mobile applications. Adobe Flash Builder 4.5  premium is interactively used for building Android, i-Phone & BlackBerry Tablet applications.

Lets start for developing Hello World application in Adobe Flash Builder for Android devices.

Download Adobe Flash Builder from Adobe’s website.

Lets start by starting on clicking New-> Flex Mobile Project.

Select Project Name as “Hello World” & Default Device as “Google Android”.

Type the following Code in ‘HelloWorldHomeView.mxml” as :

<s:VGroup width="100%" height="100%" verticalAlign="middle"
			  horizontalAlign="center">
		<s:Label text="Hello,World!" />
		<s:Button label="Continue"  click="navigator.pushView(MyNewView)" 
				  styleName="next" />
	</s:VGroup>
after </fx:Declarations>.
Next , Create a new MXML Component from HelloWorld/Src project & type the 
following code.
<s:VGroup width="100%" height="100%" verticalAlign="middle" horizontalAlign="center">
		<s:Label text="Success" />
		<s:Button label="Back" click="navigator.popView()" styleName="back" />
	</s:VGroup>
Now Time to Test, Visit Run Configuration page & select your Device.
Test now the Application in Device.
Happy Coding with Adobe Flash Builder for Mobile & Tablets.

This slideshow requires JavaScript.


 

Android Application for HealthCare using ListView with SQLite Database


Well, after all versed applications developing for Windows Phone , lets explore mobile applications for some other resources.

Android 4 , ice cream- sandwich offers a rich set of open – source API for UI development & Open GL ES framework. Lets explore for building first an android application.

Prerequisites:

Android Toolkit:  Android API 8 or 9: 2.2 ,2,3

Android Plugin for Eclipse: https://dl-ssl.google.com/android/eclipse

Lets start by creating a new project: -> Start-> new Android Application -> Select Android ADT VM -> choose package name.

Start first building UI part:

Write in HelloWorld.java :

package com.example;

import java.util.Calendar;

import android.app.Activity;


import android.app.Activity;
import android.content.Intent;
import android.os.*;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class HelloWorldActivity extends Activity {
	
	
	
	

	
	
		
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        //TextView tv = new TextView(this);
       // tv.setText("Hello,Android");
        setContentView(R.layout.main); 
       // ImageView image = (ImageView) findViewById(R.id.test_image);        
        
    //    startActivity(new Intent(this, DisplayViewsExample.class));

        
        
        Button button = (Button) findViewById(R.id.button1);
        
        button.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(HelloWorldActivity.this,WebViewExample.class);
				startActivityForResult(intent,0);
				
			}
		});
        
        Button button1 = (Button) findViewById(R.id.button3);
        
        button1.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View view) {
				// TODO Auto-generated method stub
				Intent myIntent = new Intent(HelloWorldActivity.this,Department.class);
				startActivityForResult(myIntent,0);
			}
		});
        Button button2 = (Button) findViewById(R.id.button2);
        Button button3 = (Button) findViewById(R.id.button4);
       
       
        
        
   //   startActivity(new Intent(this, Department.class));
        
    //    startActivity(new Intent(this, WebViewExample.class));

        
   
        
    }
}  

Code for Main.xml: 
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:weightSum="1"> 
     
     <ImageButton android:id="@+id/format"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo"
android:onClick=""
/>
      <TextView   
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="Sri Aurobindo Seva Kendra" 
         android:textStyle="bold" 
         android:textColorHighlight="#FFff00" 
         android:textSize="10pt"/>  
After home Screen development , move to next screen which is the department of hospitals. Which appears as navigation from 
one activity to another activity in Android.
Code for Department.java:

package com.example;

import android.app.Activity;
import android.widget.ScrollView;
import android.widget.LinearLayout;
import android.content.Intent;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemSelectedListener;



public class Department extends Activity
{   
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        //TextView tv = new TextView(this);
       // tv.setText("Hello,Android");
        ScrollView sv = new ScrollView(this);
        LinearLayout l1 = new LinearLayout(this);
        l1.setOrientation(LinearLayout.VERTICAL);
       // setContentView(R.layout.spinner); 
        sv.addView(l1); 
        
        TextView tv = new TextView(this);
        tv.setText("Departments");
         l1.addView(tv);
	
//Button button = (Button) findViewById(R.id.buttonPae);
Button button = new Button(this);
button.setText("Paediatrics");
       
 button.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(Department.this,PaediatricsDoctors.class);
				startActivityForResult(intent,0);
				
			}
		}); 
 l1.addView(button);
// Button button1 = (Button) findViewById(R.id.buttonGyn); 
 Button button1 = new Button(this);
 button1.setText("Gynaecology & Obstetrics");
 l1.addView(button1);
 
 Button button2 = new Button(this);
 button2.setText("Psychiatry");
 l1.addView(button2);
 
 Button button3 = new Button(this);
 button3.setText("General Medicine");
 l1.addView(button3);
 
 Button button4 = new Button(this);
 button4.setText("Echocardiography");
 l1.addView(button4);
 
 Button button5 = new Button(this);
 button5.setText("Eye(Opthmology)");
 l1.addView(button5);
 
 Button button6 = new Button(this);
 button6.setText("Dermatology(Skin)");
 l1.addView(button6);
 
 Button button7 = new Button(this);
 button7.setText("General Surgery");
 l1.addView(button7); 
 
 Button button8 = new Button(this);
 button8.setText("Laproscopic Surgery");
 l1.addView(button8);
 
 Button button9 = new Button(this);
 button9.setText("Dentistry");
 l1.addView(button9);
 
 Button button10 = new Button(this);
 button10.setText("Reconstructive(Plastic)");
 l1.addView(button10);
 
 Button button11 = new Button(this);
 button11.setText("ENT");
 l1.addView(button11);
 
 Button button12 = new Button(this);
 button12.setText("Gynaecological Laproscopic Surgery");
 l1.addView(button12);
 
 
 Button button13 = new Button(this);
 button13.setText("Homeopathy");
 l1.addView(button13);
 
 Button button14 = new Button(this);
 button14.setText("Gastroenterology");
 l1.addView(button14);
 
 Button button15 = new Button(this);
 button15.setText("Haemotology");
 l1.addView(button15);
 
 Button button16 = new Button(this);
 button16.setText("Audiometry & tympanometry");
 l1.addView(button16); 
 
 Button button17 = new Button(this);
 button17.setText("Neuro Surgery");
 l1.addView(button17); 
 
 Button button18 = new Button(this);
 button18.setText("Oral & Mazillofacial Surgery");
 l1.addView(button18);
 
 Button button19 = new Button(this);
 button19.setText("Cardiology");
 l1.addView(button19);
 
 Button button20 = new Button(this);
 button20.setText("Urology");
 l1.addView(button20);
 
 Button button21 = new Button(this);
 button21.setText("Neprology");
 l1.addView(button21); 
 
 Button button22 = new Button(this);
 button22.setText("Orthopaedics");
 l1.addView(button22);
 
 Button button23 = new Button(this);
 button23.setText("Oncology");
 l1.addView(button23); 
 
 Button button24 = new Button(this);
 button24.setText("Endocrino & Diabetology");
 l1.addView(button24);
 
 Button button25 = new Button(this);
 button25.setText("Acupuncture");
 l1.addView(button25);
 
 this.setContentView(sv);
	
    
	}
}
Similar build for its layout.
Next , by navigating from Button view , a stylish ListView will appear in next screen which is binded with data from SQLite 
Database. 
Code for ListView.Java:
package com.example;

import android.app.Activity;
import android.app.ListActivity;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.Toast;

public class PaediatricsDoctors extends Activity {

private SQLiteAdapter mySQLiteAdapter;

  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.doctor);
      ListView listContent = (ListView)findViewById(R.id.contentlist);



      /*
       *  Create/Open a SQLite database
       *  and fill with dummy content
       *  and close it
       */
      mySQLiteAdapter = new SQLiteAdapter(this);
      mySQLiteAdapter.openToWrite();
      mySQLiteAdapter.deleteAll();

      mySQLiteAdapter.insert("Dr.(Mrs.)Bandana Hom Chowdhuri (Monday & Friday 4:30PM)");
      mySQLiteAdapter.insert("Dr.(Mrs.)D.K.Chowdhuri (Saturday 4PM)");
      mySQLiteAdapter.insert("Dr.Jaydeep Choudhury (Wednesday & Sunday 8AM)");
      mySQLiteAdapter.insert("Dr.Leena Deb (Tuesday 9AM,thursday 10AM)");
      mySQLiteAdapter.insert("Dr.Mausumi Mukherjee (Monday,Wednesday,Friday 2:30PM)");
      mySQLiteAdapter.insert("Dr.Monidipa Banerjee (Monday 9AM)");
      mySQLiteAdapter.insert("Dr.Nupur Ganguly (Thursday 8AM)");
      mySQLiteAdapter.insert("Dr.Parbati Sengupta(Monday,Wednesday 5:30PM,Thursday 6PM) ");
      mySQLiteAdapter.insert("Dr.Paromita Roy(Monday,Tuesday,Wednesday,Friday 11AM)");
      mySQLiteAdapter.insert("Dr.Radha Lakshminarayanan(Wednesday & Friday 9AM");
      mySQLiteAdapter.insert("Dr.Raja Lahiri(Tuesday & Thursday 4:30PM");
      mySQLiteAdapter.insert("Dr.Samik Basu(Wednesday 5PM)");
      mySQLiteAdapter.insert("Dr.Shaswati Saha Biswas(Tuesday 4PM)");
      mySQLiteAdapter.insert("Dr.Sudarsana De(Friday 6PM & Saturday 1:30PM)");
      mySQLiteAdapter.insert("Dr.Sudeshna Mitra(Pal)(Tuesday 7PM)");
      mySQLiteAdapter.insert("Dr.Tridib Banerjee(Wednesday 8AM)");


      mySQLiteAdapter.close();

      /*
       *  Open the same SQLite database
       *  and read all it's content.
       */
      mySQLiteAdapter = new SQLiteAdapter(this);
      mySQLiteAdapter.openToRead();

      Cursor cursor = mySQLiteAdapter.queueAll();
      startManagingCursor(cursor);

      String[] from = new String[]{SQLiteAdapter.KEY_CONTENT};
      int[] to = new int[]{R.id.text};

      SimpleCursorAdapter cursorAdapter =
       new SimpleCursorAdapter(this, R.layout.row, cursor, from, to);

      listContent.setAdapter(cursorAdapter);

      mySQLiteAdapter.close(); 


  	}



  }
Code for SQLAdpater.java : Helper class for SQLite:

package com.example;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteDatabase.CursorFactory;

public class SQLiteAdapter {

public static final String MYDATABASE_NAME = "MY_DATABASE";
public static final String MYDATABASE_TABLE = "MY_TABLE";
public static final int MYDATABASE_VERSION = 1;
public static final String KEY_ID = "_id";
public static final String KEY_CONTENT = "Content"; 
public static final String SUBKEY_CONTENT="SubContent";

//create table MY_DATABASE (ID integer primary key, Content text not null,SubContent text not null);
private static final String SCRIPT_CREATE_DATABASE =
"create table " + MYDATABASE_TABLE + " ("
+ KEY_ID + " integer primary key autoincrement, "
+ KEY_CONTENT + " text not null);";

private SQLiteHelper sqLiteHelper;
private SQLiteDatabase sqLiteDatabase;

private Context context;

public SQLiteAdapter(Context c){
context = c;
}

public SQLiteAdapter openToRead() throws android.database.SQLException {
sqLiteHelper = new SQLiteHelper(context, MYDATABASE_NAME, null, MYDATABASE_VERSION);
sqLiteDatabase = sqLiteHelper.getReadableDatabase();
return this;
}

public SQLiteAdapter openToWrite() throws android.database.SQLException {
sqLiteHelper = new SQLiteHelper(context, MYDATABASE_NAME, null, MYDATABASE_VERSION);
sqLiteDatabase = sqLiteHelper.getWritableDatabase();
return this;
}

public void close(){
sqLiteHelper.close();
}

public long insert(String content){

ContentValues contentValues = new ContentValues();
contentValues.put(KEY_CONTENT, content);
return sqLiteDatabase.insert(MYDATABASE_TABLE, null, contentValues);
}

public int deleteAll(){
return sqLiteDatabase.delete(MYDATABASE_TABLE, null, null);
}

public Cursor queueAll(){
String[] columns = new String[]{KEY_ID, KEY_CONTENT};
Cursor cursor = sqLiteDatabase.query(MYDATABASE_TABLE, columns,
  null, null, null, null, null);

return cursor;
}

public class SQLiteHelper extends SQLiteOpenHelper {

public SQLiteHelper(Context context, String name,
  CursorFactory factory, int version) {
 super(context, name, factory, version);
}

@Override
public void onCreate(SQLiteDatabase db) {
 // TODO Auto-generated method stub
 db.execSQL(SCRIPT_CREATE_DATABASE);
}

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
 // TODO Auto-generated method stub

}

}

}
Lets enjoy Android Application development. After running the application explore the various screen shots. 

This slideshow requires JavaScript.

 

Bing Maps for Windows Phone 7


Bing Maps portal helps to find the track of your location worldwide through Windows Phone 7. It binds Private key pair from www.bingmapsportal.com & find a private key from https://www.bingmapsportal.com/application/ by  providing your live ID & application name & URL.

Use the private key pair to use it your code. If you have downloaded the Windows Phone 7 Training kit then check the BingMaps lab. Check the Ex-1 Bing Maps Control , Find Begin Then start code.

In App.Xaml.Cs , Add the BingMaps Private key:

internal const string Id = "type your Private Key"; 

In MainPage.Xaml add Maps Control & Add the corresponding Maps data-binding:
<my:Map Name="Map" Height="756" Width="480" CredentialsProvider="{Binding CredentialsProvider}" 
CopyrightVisibility="Collapsed" LogoVisibility="Collapsed" ZoomLevel="{Binding Zoom,Mode=TwoWay}" 
Center="{Binding Center,Mode=TwoWay}">

            <my:Map.Mode>
                <my:AerialMode ShouldDisplayLabels="True" />
            </my:Map.Mode>

            <Button x:Name="ButtonZoomIn" 
                    Style="{StaticResource ButtonZoomInStyle}"
                    HorizontalAlignment="Left" VerticalAlignment="Top"
                Height="56" Width="56" Margin="8,180,0,0"  Click="ButtonZoomIn_Click"/>

        <Button x:Name="ButtonZoomOut" 
                Style="{StaticResource ButtonZoomOutStyle}"
                HorizontalAlignment="Left" VerticalAlignment="Top" Height="56" Width="56" 
Margin="8,260,0,0" Click="ButtonZoomOut_Click" />

        </my:Map>

in Code-Behind add: 
private double _zoom;

        private const double DefaultZoomLevel = 18.0;
        private const double MaxZoomLevel = 21.0;
        private const double MinZoomLevel = 1.0;
        private static readonly GeoCoordinate DefaultLocation = new GeoCoordinate(47.639631, -122.127713);
        private GeoCoordinate _center;

        #endregion

        #region Fields

        private readonly CredentialsProvider _credentialProvider = new ApplicationIdCredentialsProvider(App.Id);
        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets the map zoom level.
        /// </summary>
        public double Zoom
        {
            get { return _zoom;}
            set
            {
                var coercedZoom = System.Math.Max(MinZoomLevel, System.Math.Min(MaxZoomLevel, value));
                if (_zoom != coercedZoom)
                {
                    _zoom = value;
                    NotifyPropertyChanged("Zoom");
                }
            }

        }
 public CredentialsProvider CredentialsProvider
        {
            get { return _credentialProvider; }
        }

// To change the map-mode from Aerial View to Road View:
private void ChangeMapMode()
        {
            // TODO : Change map view mode.
            if (Map.Mode is AerialMode)
            {
                Map.Mode = new RoadMode();
            }
            else
            {
                Map.Mode = new AerialMode(true);
            }

        }
Now GPS navigation functionality with BingMaps portal is available in your Windows Phone.

This slideshow requires JavaScript.

Sharepoint 2010 With Windows Azure Development Agenda


The Sharepoint 2010 with Windows Azure Training kit consists of  useful hands on labs , presentations & Video presentations.

The hands on labs mainly focuses on :

  • Windows Azure Marketplace DataMarket
  • Introduction to SQL Azure
  • Windows Azure Overview
  • Sharepoint 2010 development with Visual Studio 2010.
  • Consuming Windows Communication foundation services from Sharepoint 2010 & Infopath 2010.
  • Integrating Windows Azure with Office 2010.
  • Geospatial applications using Sharepoint 2010 , SQL Azure & Bing Maps.
  • Securing Sharepoint 2010  with Azure.
  • Sharepoint 2010 with Blob Storage.
  • Sharepoint with Windows Azure Hosted services.
  • Sharepoint with Windows Azure Event Handlers.
  • Windows Azure with Sharepoint workflow using Azure Worker role with TCP endpoints.

Sharepoint 2010 with Windows Azure Development Kit


In the world of Windows Azure , Sharepoint is integrated with latest features like implementing Bing Maps with SQL Azure, connecting on-premise Sharepoint 2010 applications  with Azure Appfabric  Service buses. This features hosts a practical implementations as sandbox like integrating with Office 2010 , Microsoft Office 365.

The training kit provides a vast answer of questions to integrate on-premise Sharepoint application with Windows Azure.

Navigating Silverlight Azure applications in Sharepoints , besides hosting Office 365 applications with Sharepoint in Azure. Bing Maps is also implemented in SQL Azure which is shown in hands on lab of the Training kit. In future soon coming ACS  STS token service implementation of Office 365 with Sharepoint in Windows Azure .

Explore the Sharepoint 2010 with Windows Azure Training kit .

Download :http://www.microsoft.com/download/en/details.aspx?id=24398

Windows Phone 7 Mango ‘PhotoFun’ Application


Windows Phone 7.1 ‘Mango’  unveils several exciting features. One of them is ‘PhotoFun’ which is a pretty cool staff with real device.

Just put the device in landscape mode & scale down to capture image either in ‘Gray-Scale, Sepia, Flowers, Old-Frame ‘ options.

The application enables to capture, load , save & feed Data.

Check out some code :

protectedoverridevoid OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)

{

if(null == camera)

{

camera =  newPhotoCamera();

camera.Initialized += camera_Initialized;

 

//Event is fired when the button is half pressed


 

CameraButtons.ShutterKeyHalfPressed += camera_ButtonHalfPress;

 

//Event is fired when the button is fully pressed


 

CameraButtons.ShutterKeyPressed += camera_ButtonFullPress;

 

//Event is fired when the capture sequence is complete and an image is available.


camera.CaptureImageAvailable += camera_CaptureImageAvailable;

camera.CaptureCompleted += camera_CaptureCompleted;

 

//Set the VideoBrush source to the camera


viewfinderBrush.SetSource(camera);

}

 

base.OnNavigatedTo(e);

}

 

protected  overridevoid OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)

{

CameraButtons.ShutterKeyPressed -= camera_ButtonFullPress;

CameraButtons.ShutterKeyHalfPressed -= camera_ButtonHalfPress;

pumpEffectedFrames =  false;

camera.Dispose();

camera = null;

base.OnNavigatedFrom(e);

}

Download Code Samples: https://skydrive.live.com/#!/?cid=7f185b0e5a1ba82e&sc=documents&uc=11&id=7F185B0E5A1BA82E%21130!cid=7F185B0E5A1BA82E&id=7F185B0E5A1BA82E%21130&sc=documents

 

 

 

%d bloggers like this: