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 ?
Tips and Tricks for developing applications for Windows Mobile, iPhone, Android
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, December 8, 2009
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.
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;
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.
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.
Subscribe to:
Posts (Atom)