Coding Paradox

Blog On .Net, CSharp, Windows Phone Programming

C# 6.0 New Features

without comments

C# 6 is available with Visual Studio 2015 and it comes with some new features. To try C# 6, download and install the Visual Studio 2015 preview.

Here are some of the new features that are available in C# 6

1) Auto Property Initializers

You can now assign the value to a property directly at the declaration place. With read only properties (getter only), you can assign the value at the declaration or in the constructor Read the rest of this entry »

Written by Mako

February 24th, 2015 at 4:46 am

Posted in Uncategorized

Using Camera in Android Application

without comments

In this post we will take a look at how to integrate camera with our android application. There are two ways in which we can use Camera in our Android application. Android provides you with 2 options while working with Camera

1) Use an existing Camera application

2) Work with Camera hardware API directly

If you are developing a full fledged camera application, then you need to work with the Camera API directly as it gives you more control but it involves a lot more coding. If you just want to integrate the camera with your app, the first option is better and simpler. In this tutorial, we will learn how to use an existing camera app with our application. We will create a simple application that will take pictures and display the same in a ListView. The application will display a Camera button, clicking which will open the existing camera app present on the device. Once the user takes a picture, he will be redirected back to our application and the picture that he has taken will be displayed in a listview and it will be saved to a permanent location. Read the rest of this entry »

Written by Mako

December 2nd, 2014 at 8:57 pm

Getting Started with AngularJS

without comments

One of the cool things i recently started learning was AngularJS. It is a JavaScript framework for building client side JavaScript applications which follows the Model-View-Controller pattern and ensures that your application is property architectured, easy to maintain and test. Some of the great features that it offers include two way data binding, client side templates, directives, routing, promises, dependency injection etc. All these features helps to reduce the complexity of the web application. If you have previous experience using Jquery, you will immediately notice how you can manipulate the DOM easily without writing any JavaScript code.

Read the rest of this entry »

Written by Mako

July 7th, 2014 at 7:33 pm

Using Local Database in Windows Phone Apps

without comments

In my previous posts, we looked at how to store data in Windows Phone Apps using Local Storage and Isolated Storage. In this post we will take a look at how to create a Local Database for storing data of our Windows Phone app. Database are great storage option when your app want to store some relational data. The database gets created into the local app folder and is only accessible to the same application.

We will be using the LINQ to SQL assembly and mainly the classes present in the System.Data.Linq and System.Data.Linq.Mapping namespace to create our database schema and perform CRUD operations on it.

In this demo, we will create a sample application that will store Students Information in the database. For each student, we will also store the courses that the student has taken. Lets get our hands dirty.

Open Visual Studio –> New Project –> Windows Phone Blank App and name the application “LocalDatabaseWPApp”.

Read the rest of this entry »

Written by Mako

May 12th, 2014 at 5:40 pm

Working With Local Storage in Windows Phone App

with 2 comments

In almost all the apps that are developed, some sort of data needs to be stored on the device either temporarily or permanently. There are lots of options of storing data when working on Windows Phone platform. In my earlier tutorials, we looked at how to create a simple Windows Phone app and performing page navigation. In this post, lets take a look at how to Read and Write files to the Local Folder in Windows Phone.

Open Visual Studio 2013/2012 and Create a New Windows Phone App project and name it “LocalStorageWpApp”. We will be creating a small application where we will read and write contents in a local file on Windows Phone.

Once the default solution is create, open MainPage.xaml and rename the page title to say “Local Storage”. Add the below XAML code to the ContentPanel Grid.

Read the rest of this entry »

Written by Mako

April 17th, 2014 at 6:47 pm

Getting Started With Windows Phone Development

with 2 comments

I started developing application for the Windows Phone platform a few months ago. There are a lot of things i learned along the way and i want to share all that with you through a series of blog posts. In the current post, we will focus on the basic and will develop a very simple app for the Windows Phone platform.

Getting The Development Tools

To develop applications for Windows Phone 8, you will need to download and install the Windows Phone 8 SDK. You can get the sdk by going to http://dev.windowsphone.com and clicking on “Download Dev Tools” which will take you to the page from where you can download the Windows Phone 8 SDK. Please be aware of the minimum system requirements that is needed. You will need Windows 8 64 bit or Windows 8 pro 64 bit version or higher if you want to use the Windows Phone 8 Emulator. You will also need Visual Studio 2012/2013 installed. If you don’t have VS 2012/2013 on your machine, the setup will install the Visual Studio 2012 Express for Windows Phone. For running Windows Phone Emulator, you will need Windows 8 pro or higher and a processor that supports SLAT. If your system doesn’t meet the requirement for Emulator, you can still develop applications using the SDK but you will need a Windows Phone 8 device to test your app. Read the rest of this entry »

Written by Mako

March 31st, 2014 at 7:18 am

Calling Web Service from Windows Phone 8 App

without comments

In this post we will take a look at how to call a web service from a Windows Phone 8 app and retrieve data in JSON format. We will be calling a simple REST web service from our sample application to retrieve the latest weather information and display the same.

Web Service

We will be using the weather API provided by OpenWeatherMap.org. The Api is simple and free to use and provides current weather information as well as weather forecast from the next few days. The api provides various options to get the weather information based on Location, Pin Code, Latitude/Longitude coordinated etc. We will be using the below mentioned api call to get the weather forecast data for a week based on Pin Code. Read the rest of this entry »

Written by Mako

February 22nd, 2014 at 10:57 am

Windows Phone 8.1 Hands On

without comments

Microsoft recently released Windows Phone 8.1 as a developer preview for Developer Unlocked phones. Anyone having a developer unlocked phone can install the OS update and get to try out the new features. I installed it on my Lumia 520 and here are some of the new features which are worth mentioning.

New Features

Cortana (Personal Assistant)

‘Cortana’ is a digital personal assistant and Microsoft’s version of Apple’s Siri and Google Now. Currently it is only available to US region only but even if you are from a different region you can try it out by changing your phone’s Location setting to US. This is one of the biggest new feature introduced and it is here to make your life easier. Instead of searching for anything, you can ask Cortana to do it for you. It can be voice activated or you can simply type in the questions that you want to ask. You can ask things like “Set a reminder for gym at 5 am”, “Play Wake Me Up by Greenday”, “Find bars near my place” etc. Currently as it for US region only, the location based search won’t work well if you are in some other regions but for other things, it worked great.

Read the rest of this entry »

Written by Mako

February 20th, 2014 at 6:49 pm

Performing Page Navigation in Windows Phone Apps

without comments

In the previous article, we learned the basics of creating a simple Windows Phone app. In this post, we will look at how to perform navigation between different pages in Windows Phone app. We will use the same Visual Studio solution used in the previous post and continue from there.

Open the MyFirstWPApp solution in Visual Studio. We will be adding a new page in our solution to which we can navigate to. Right Click on the project name in solution explorer –> Select Add –> New Item.

In the window that opens, select “Windows Phone Portrait Page”, name the page as “SecondPage.xaml” and click on Add.

Read the rest of this entry »

Written by Mako

February 6th, 2014 at 2:24 pm

Introduction to Swift

without comments

Swift is a brand new programming language which was revealed by Apple at WWDC 2014 along with iOS 8. It is set to eventually replace the Objective – C language which is currently being used for Apple development. Swift is easier to learn and it has got a much cleaner syntax as compared to Objective – C. The syntax of Objective – C was very different compared to what you may be used to if you have previous experience with Java, C#, Javascript etc. With Swift, the syntax will seem a bit similar if you have previous web development experience.

Swift is designed to work alongside Objective – C programs. You can add swift code to your existing applications and it will work fine with the existing Objective – C code. If you are new to iOS development, then you can easily start learning Swift although some knowledge of Objective – C may also be helpful as there are a lot of existing libraries which are already written in Objective – C. But Swift is definitely the language for the future and it will slowly replace Objective – C. Along with the language, Apple also released a Swift programming guide which gives a detailed walk through of the language. In this post, i will briefly give an introduction to basic Swift syntax. Read the rest of this entry »

Written by Mako

February 6th, 2014 at 9:05 am

Posted in Uncategorized

Tagged with , , ,