Tuesday, June 10, 2014

Certified Xamarin mobile developer !

Hi,


I just received my Xamarin certificate!
I'm now a Xamarin-certified Mobile developer.



It was not an easy exam, it went pretty deep on some of the internals and covered a lot of iOS and Android native features. Passing grade is 80% correct of 150 questions. I got 89% and the exam software showed me what the correct answers were for what I got wrong.

I'm lucky that I got this opportunity to enroll in Xamarin university. and use Xamarin in building cross-platform apps

C# developers can use Xamarin to write native iOS, Android, and Windows apps with native user interfaces and share code across multiple platforms.

it is really nice!

I'll write more posts about my experience with Xamarin and the benefits of it isA.

Friday, June 21, 2013

[Windows Phone tips] Tip 1: Scrollable Contents

SA,

I'm going to share some tips I learned through the time I've spent with developing Windows Phone apps.

and here is the first one:-

Intro:-

sometimes you want to build a scroll-able page, for example a page that is divided into two sections (article and a comment) and you want to let the user change the size of each part smoothly.

and here is a dummy sample
 -first (the normal view)
Normal View
and then the user can  drag the black rectangle(it could be a better image with arrows :D) up and down to be like:
more space for the comments
and
The user can drag and the other content will change it's size dynamically, and can scroll both of them.

How can we do that?!

just create a new simple Windows Phone project,

We will split our ContentPanel Grid into two parts

we are going to tell it that it will have tow rows

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>


and add the top Grid:
 
<!-- Top Grid -->
<Grid Background="White" Margin="0,0,0,12" Grid.Row="0">
<!-- Scroll Viewer, to let the user scroll -->

<ScrollViewer>

<TextBlock FontSize="30" TextWrapping="Wrap" 

   Text="Auto Updated Text, This would be the main text, 
   and will change it's size according the user's action. 
   Your time is limited, <so don't waste it living someone else's life. 
   Don't let the noise of other's opinions drown out your own inner voice.
   And most important, have the courage to follow your heart and intuition." 
   Foreground="BlueViolet"/>

</ScrollViewer>

</Grid>

just TextBlock inside ScrollViewer.

and  the bottom content:-
 
<!--Bottom Grid-->
            <Grid Grid.Row="2"  x:Name="BottomGrid" Height="240" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>

will split it into two rows; for the black rectangle and the bottom comment.
first part:-
 
<!-- Scroll Viewer, here where the magic happens :D 
 you can change the balck with any beatufel image with arrows(Up and Down) -->

<ScrollViewer Grid.Row="0" ManipulationDelta="ScrollViewer_ManipulationDelta_1" 
                 Height="30" Background="Black"/>

and the content will be also TextBlock inside ScrollViewer
 
<!--Bottom Content-->
<ScrollViewer Grid.Row="1" >
                 <TextBlock FontSize="28" TextWrapping="Wrap" 
                               Text="Bottom Text, This would be comment of 
                                     an article, more details,...Which 
                                     the user wanna change 
                                     the size any time. 
                                   Steve Jobs wrote this quote above ">
                    </TextBlock>
                </ScrollViewer>


How can we change the size while scrolling ?!

we listened to ManipulationDelta event to do that
and here is the code:-
 
 private void ScrollViewer_ManipulationDelta_1(object sender, 
             System.Windows.Input.ManipulationDeltaEventArgs e)
        {            
            BottomGrid.Height -= e.DeltaManipulation.Translation.Y;
        }

what happens is we change the height of the bottomGrid, and the TopGrid will take the space.


Full Source Code:
https://github.com/mostafa-elabady/ScrollableContentWP8


Have fun :D

Saturday, April 6, 2013

Git + Visual Studio 2012 + SkyDrive


SA,
--update
   this works for both Visual Studio 2010 and Visual Studio 2010

I faced a problem that I need to version my Visual Studio Projects across more than one PC.

I'm going to write how to do that easily using Git+SkyDrive

steps to do:

1- Get git

Install git from here : http://git-scm.com/download/win
Add git to path [optional]

2- Install SkyDrive App

You should use SkyDrive, DropBox, Google Drive, or any other online storage  to synchronize your projects on multiple PCs.

get SkyDrive from here: https://apps.live.com/skydrive


3- install Git Source Control Provider plug-in to Visual Studio

 Git Source Control Provider is a Visual Studio extension that integrates Git with Visual Studio.

open Visual Studio, go to Tools | Extension Manager, search online gallery for Git Source Control Provider and install it.

check this: http://gitscc.codeplex.com/wikipage?title=Installation&referringTitle=Documentation


-Install Git for Windows, or Git Extensions, or TortoiseGit
I'm using TortoiseGit.

-Add a new folder in your SkyDrive Folder

-Create your project there in your SkyDrive folder

-To create Git repository to an existing project: http://gitscc.codeplex.com/wikipage?title=Create%20Git%20Repository&referringTitle=Documentationsimply 
 -- you can do this using cmd

Finally, check this documentation: http://gitscc.codeplex.com/documentation



Have Fun :)

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.

Monday, April 4, 2011

Google Student Ambassador

I have received an invitation to apply to be a Google Student Ambassador, here's the invitation :
Apply to be a Google Student Ambassador

Are you thrilled by new technology? Do you love Google products? Do you want to bring new opportunities to your university and your peers? Do your friends say you're a natural leader? If so, the Google Students Ambassador Program may be perfect for you!


Through the Students Ambassador Program, you become a liaison between Google and your university. Ambassadors plan and host several events during the school year, introduce students to new Google products and features and act as a campus contact for Google teams.

Google Student Ambassadors may:

  • Work closely with local Google teams
  • Host and organize events to bring awareness about Google's products and brand
  • Spread the word about competitions, training opportunities, scholarships and other events
  • Attend Google events as a Google representative
  • Help Google to better understand your campus' culture
  • Build relationships on campus with faculty and student groups
  • Test products and features
  • Promote product use and new product launches to students
  • Be a source of knowledge for your university about Google products
  • Spread Google goodwill to your fellow students

What are the qualifications?
This opportunity is currently by invitation only and is open to students at university. Google MENA Student Ambassadors must be:

  • Currently enrolled in a college or university in the Middle East or North Africa
  • Pursuing a BA/BS or MS degree
  • Passionate about technology
  • Able to plan events and manage a budget
  • Actively involved in student life on campus


What is the time commitment?

  • One academic school year
  • Approx. five hours per month
  • Three to four events per year


Benefits:
As a Google Student Ambassador, you will:

  • Receive regular updates about exciting new Google products / features, programs and announcements
  • Enhance your professional development, leadership, technical and communication skills
  • Be eligible to participate in special Google events, product trainings and be considered for local internships
  • Exchange best practices with Ambassadors from other schools and disciplines
  • Add the Google Student Ambassador Program experience to your resume
  • Get your own Google SWAG


Sounds great, how do I apply?
To apply, you should:
1. Preferably be a second or third year student at your university.
2. Write an Essay on one of these topics:  
Computer Science and Engineering students should choose among:
Mobile applications (SMS and Mobile Web), Local Content & Localization, Cloud Computing or Open Source, explaining “How these Technologies can become an integral part of our lives in the Arab World.”
Business and Economic students should choose among:
Social Networks, Digital Agencies, Online Advertising or Online Banking Services, explaining “How these Services and Trends can contribute to a healthy online business eco-system in the Arab World.”
3. Write a motivation letter on why you want to be an Ambassador, what you can change in your Country through learning new technical skills and how using Google tools could help your university.
4. Provide a short statement from your Professor or Head of Department confirming your name, level and area of study.
5. Add your Essay, Motivation letter and Professor/Head of Department statement to the registration form by Saturday, April 30. Accepted students will be informed by mid May 2011.

If you are a professor / lecturer / TA, please help spreading the word on campus and help your students identify the potential of becoming a Google student ambassador for the university - feel free to ask for posters and fliers to be placed on your campus.

go and apply now, it's a great opportunity :)