Pages

Hello geeks !!

Welcome.

This blog gives you several interesting information related to application development for smartphones such as Windows Mobile, iPhone, Android.

You may find pieces of code that might be of help to understand the concept that is being explained.

Please feel free to post back your questions, comments and suggestions.



Tuesday, April 27, 2010

iPhone OS 4.0 - Multitasking

Brief Introduction

The multitasking feature on iPhone OS 4.0, is not 100% multitasking; it is just ‘Task switching’ instead.

Apple provides a method for running those applications which essentially need the ability to run in the background, such as music player, VoIP applications, etc.

This enables users to keep listening to audio, while they do some other operation in the foreground; keep the VoIP application online in order to receive calls, even when some other app is running in the foreground; track location information in the background using location-based apps, while doing other tasks.

Double tapping on the Home button shows a Task bar with the list of applications running the background. Taping on the icon invokes the application from its previous state.
To quit an application, Press and Hold the application icon on the Task Bar.
A ‘-‘ sign appears. Tap on it to quit.

What does the System actually do?

Tuesday, December 8, 2009

Alternative to GPS using Radio Interface Layer (RIL)

GPS receivers are not available on all devices.

I wanted a work around to detect the location or user's country.

By digging in, I found the RIL (Radio Interface Layer) API.

You can find the RIL API and documentation here

The RIL is an interface between the radio hardware on the device and the system software.
The application can use the RIL API to interact with the radio hardware.

So what to do ?

Friday, December 4, 2009

Push SMS Notification

 That's a fantastic concept that can be developed in a very few steps.

Microsoft provides us with 'Microsoft.WindowsMobile.PocketOutlook.MessageInterception.MessageInterceptor' class.

MessageInterceptor API Reference here

There are basically two types of Interception.

1. Transient Interception - This is when you application is running. Whenever an SMS gets delivered, you application receives a notification with the SMS details.

2. Persistent Interception - This will send notification of incoming SMS to you application, event if the application is not running. Cool :)

Let's go through step-by-step.

Identify the Windows Platform Version

Its not as tough as it would seem. It's quite simple.

The coredll.dll exposes this function.
SystemParametersInfo(uint uiAction, uint uiParam, StringBuilder pvParam, uint fWiniIni)


The first parameter specifies what System Parameter you want to access.

With respect to the Platform, there are two parameters that can be sent.

SPI_GETPLATFORMTYPE = 257;
SPI_GETOEMINFO = 258;

Find the Device ID of your Windows Mobile device.

Before going into finding a Device ID, it's good to know a few things in detail about what a Device ID actually is.




A Device ID is basically a unique identifier that is necessary for the device identification as well as security.


The Device ID basically comprises of two parts.


1. platform ID
2. handset ID or preset ID


The 'platform ID' is the ID for a particular manufacturer,i.e., handsets from a particular manufacturer would have this part of the Device ID same.


The 'handset ID' is an identifier that is preset with every handset. This identifier is unique for each handset that is manufactured by a particular manufacturer.


So, both the platform ID and the handset ID are not unique individually. 
It's only the combination of the 'Platform ID' and the 'Handset ID' that is unique.


OK. Now lets go on to the code.


Thursday, October 22, 2009

Capture a screen shot of the current screen - Windows Mobile

I've wondered many times, how it would've been if there's a 'Prt scrn' button on the Windows Mobiles.

Well, as I understand now, its the job of the developers around, to do it, programmatically, and give it to the masses.

Thanks to Microsoft, atleast they've provided the functions for doing this programmatically.

Here's the code to do it.

Answer or Ignore Incoming call on Windows Mobile

I've tried many times, to answer or ignore an incoming call, when the call is from an unwanted number. So, just thought an application could be useful for many of you guys out there .

Developers try them out.