Header Sep
Symbian OS Tips, Tricks & Code
My Rating Score
Login to rate page

November 2004
Mobinfo API - a library to reach mobile phone information from C++ applications

 

Mobinfo is a redistributable library which provides a convenient API for Sony Ericsson's UIQ-based smartphones P800, P900 and P910, which includes methods to access the following information:

  • IMEI and IMSI numbers
  • Network availability, location and change notification
  • Signal strength

For Sony Ericsson P800, not all of this information can currently be given, but this may change with new releases of the library.

The library does not intend to provide a complete mobile phone function API for third parties, but is instead an easy-to-use library for C++ applications which only need some functionality. The API aims to provide an easy path to Etel features.

The library can be found here>>

The package is installed as an add-on to the UIQ SDK.

A small test application for the library can be downloaded here>>

To build the test application for the device, give the following commands:

$ bldmake bldfiles
$ abld build armi urel
$ makesis mobinfotest.pkg

The pkg file may have to be edited to provide the correct search path to the file mobinfo.sis.

Using the library
Mobinfo is a shared, dynamically linked and loaded library with a static interface and the classes are not intended for derivation.

To use the library, the header files "mobileinfo.h" and "mobinfotypes.h" are used, as well as "mobinfo.dll". The dll is contained in the mobinfo.sis file, which is included in the mobinfo package. In order to embed mobinfo.sis in your component's SIS file for re-distribution, the following line should be added to the pkg file:

@"<some path you have the sis>\mobinfo.sis",(0x1020483d)

Since some of the information that the API provides may take time to access, the library makes extensive use of active objects. All calls can have a single request pending at any time and should the same call be issued while another is in progress, it will complete with a KErrInUse error.

The lib file mobinfo.lib should be added to the mmp file in order to build a project that involves the mobinfo API.

The following list shows some of the most important methods used to access the functionality of the API:

void CMobileInfo::GetIMEI(TMobileIMEI& aImei, TRequestStatus& aStatus)

void CMobileInfo::GetIMSI(TMobileIMSI& aImsi, TRequestStatus& aStatus)

void CMobileNetworkInfo::GetCellId(TMobileCellIdBuf& aCellId, TRequestStatus& aStatus)

void CMobileContext::
GetSignalStrengthLevel(TMobileSignalStrength& aLevel, TRequestStatus& aStatus)  

 

More information:

My Rating Score
Login to rate page