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 »
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 »
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.
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 »
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 »
In this article, we will be creating a simple “Hello World” Android application. We will use the default template that Eclipse provides while creating a new android app and we will also examine the files that are created. I will give a brief overview of each step and you will get a fair idea on how you can start developing applications. To develop applications for Android, you will require the Android SDK along with the platform tools and a development environment. In this tutorial, i will be creating the application using the Eclipse IDE. To download the tools and configure your development environment, visit the Android Developer site and download the ADT bundle. Once you have all the tools installed, you are ready to proceed further. You will also need to have a basic knowledge of Java and have the latest Java SDK installed on your machine.
Background Agents and Scheduled Tasks allows your application to execute to code in the background even when the application is not running in the foreground. This is quite useful in various type of scenarios where you want to update the Live Tile frequently, show a toast notification on getting some data from web service, perform some data synchronization etc. In this tutorial we will take a look at how to use Background Agent to update the app tile in Windows Phone 8 application.
The Windows Phone API includes the ScheduledTaskAgent class which can be used to create Background agents which run on periodic schedules. Two types of tasks can be created which are
PeriodicTask : This is useful for scenarios which require small time to execute. This is run once every 30 minutes are useful for performing tasks like raising notifications, updating tile etc.
ResourceIntensiveTask : This is useful when performing operations which require a long amount of time. This tasks executes for 10 minutes however there are a lot of criteria related to processor activity which must be fulfilled before the task is executed. You can use this while performing lengthy operations like synchronizing data or uploading pictures.
A Windows Phone application can have only one background agent but it can register both PeriodicTask as well as ResourceIntensiveTask. If an application registers both the type of tasks, there are both executed at different intervals. The tasks can use a limited amount of memory which is around 11 MB at a given time. If memory usage increase, the task is immediately terminated. If the agents terminated two consecutive times due to unhandled exceptions, they are automatically removed from schedule. Read the rest of this entry »
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”.
In my previous post, we looked at how to use local storage in Windows phone to save the data. In this post, we will look at another way of storing the data locally using IsolatedStorage. In most of the applications that we develop, we will need some way to save ‘Settings’. IsolatedStorage is quite useful in that scenario as we can easily save/retrieve settings from that.
Isolated Storage provides a way to store data locally in the file system. It is called ‘isolated’ as only your application has access to the data. There are two ways in which data can be stored in IsolatedStorage. We can store the data as Name/Value settings using IsolatedStorageSettings and you can also save normal files using IsolatedStorageFile. Data present in IsolatedStorage is persisted even when the application is stopped, tombstoned or closed or even if the phone is switched off. Data is going to be present unless it is removed manually or the application is uninstalled. Read the rest of this entry »
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.
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.