Friday, November 2, 2012

Cairo Metro App

A.A.W.A,

I've decided to redevelop Cairo Metro, this time  for android and with more features.


Brief Description: find the nearest metro station easily based on your Current location and in-metro guide.


The app offers 3 solutions:-

  1. you can find the nearest metro station and see the shortest path to get there.
  2. if you are already in metro and asking the most common question "how to get to station X from here?!", the app will tell you which line you should use and how many stations left.
  3. small photo-gallery for Cairo Metro

Screenshots:









I know, user interface is not very good :|, I will try to make it better or find a good designer :D

I've submitted this app to Vodafone AppStar, but I don't know if I have a chance to win or  not because this is my only app, they said "the more you submit, the more are your chances of winning!" :|, they just need more apps!!

How I made this app:

We need :-
- the current GPS location.
- list of metro stations and GPS location for each one.
- find the Topx  nearest stations using a straight formula.
- find the nearest one using Google Maps API( Distance Matrix API )
- get the path and draw it on map, using Google Directions API
- the guide activity is very simple, two dialogs with listView and textView for output.
- photo-gallery is a simple gallery activity.

I wish I can release a tutorial on how I made this app soon, and source code!



Sunday, March 11, 2012

How to use DatePicker Control in Wp7

Hello,

in this blog I'm going to talk about DataPicker Control in windows phone 7

I used it in my application How old

The DatePicker looks:


first, you should download The Windows Phone Toolkit from here: http://goo.gl/L1H0j
Straight from Microsoft, both the Silverlight Toolkit and Silverlight for Windows Phone Toolkit provide the developer community with new components, functionality, and an efficient way to help shape product development. Toolkit releases include open source code, samples & docs. 
 The toolkit provides many useful components like AutoCompleteBox, DatePicker, DateTimeConverters, GestureService, PerformanceProgressBar, TimePicker, WrapPanel, and more....




After installing the toolkit, press Ctrl+Shift+N to create a new project



  then add a reference to the silverlight toolkit dll, right-click on the References item for your project and choose Add Reference, then add Microsoft.Phone.Controls.Toolkit and press ok






in the xaml code, you should add toolkit prefix declaration
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"

then the code is
 <toolkit:DatePicker x:Name="datePicker" Value="2/3/2010"/>
then you should add the applicationBar Icons

-create a new folder and name it "Toolkit.Content" 
-copy the icons from C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Toolkit\Oct11\Bin\Icons
They must be named "ApplicationBar.Check.png" and "ApplicationBar.Cancel.png", The Build Action must be "Content".




you can customize the Date format
<toolkit:DatePicker x:Name="datePicker" Value="2/3/2010"  ValueStringFormat="{}{0:D}"/>

The standard for date formats: http://msdn.microsoft.com/en-us/library/az4se3k1%28v=VS.95%29.aspx


you can also add a header
 Header="DatePicker"
There are many events you can use
for example ValueChanged

        private void datePicker_ValueChanged(object sender, DateTimeValueChangedEventArgs e)
        {
                textBox1.Text = datePicker.ValueString;
        }


Friday, March 2, 2012

Windows Phone 7



I have attended a session 2 months ago called “Wp7Spark” to get started with Windows Phone 7, then I learned a lot of good things by myself.

The System looks easier for developers and users as well, but needs a  very good device.

The System looks like :







Application Life Cycle:








to get started:


download The VISUAL STUDIO 2010 EXPRESS FOR WINDOWS PHONE


or download the SDK: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27570


Tutorials for getting started: http://create.msdn.com/en-US/education/quickstarts




I will blog (iSA) about solutions for problems I faced while developing.