Friday, June 30, 2006

Conference call on Symbian phones

The procedure to create conference call is targeted for Symbian OS prior version 3.0.
The code needs a little hack to compile and link because it uses telephony APIs that are not public on Nokia SDKs; in fact third party software that manages phone calls should use the CTelephony class however only a subset of functionalities are provided by this class.
The whole functionalities are provided by Etel Core and Etel GSM APIs.

RMobileConferenceCall, in etelmm.h, is the class to set up conference call.

class RMobileConferenceCall : public RTelSubSessionBase
{
public:

IMPORT_C RMobileConferenceCall();
IMPORT_C TInt Open(RMobilePhone& aPhone);
IMPORT_C void Close();


IMPORT_C void CreateConference(TRequestStatus& aReqStatus) const;
IMPORT_C void AddCall(TRequestStatus& aReqStatus, const TName& aCallName) const;
IMPORT_C void Swap(TRequestStatus& aReqStatus) const;
IMPORT_C void HangUp(TRequestStatus& aReqStatus) const;
IMPORT_C TInt EnumerateCalls(TInt& aCount) const;
IMPORT_C TInt GetMobileCallInfo(TInt aIndex, TDes8& aCallInfo) const;

.....

};

I assume that you are familiar with Active Object (AO) and call notification because most part of the methods are asynchronous so you have to create an AO to wait for completion. And of course you can create a conference call only if there are two or more active calls.

The state machine that describe the engine is:

Just for sake of simplicity, when the second call is answered listening is stopped and the two calls are joined in conference until one of them terminates.

Below I provide some snippets to use the RMobileConferenceCall class.

The 2nd phase of the constructor:
void CConferenceEngine::ConstructL()
{
User::LeaveIfError(iTelServer.Connect());
RTelServer::TPhoneInfo phoneInfo;
User::LeaveIfError(iTelServer.GetPhoneInfo(0, phoneInfo));
User::LeaveIfError(iPhone.Open(iTelServer, phoneInfo.iName));

//array of call names
iCallNameArray = new (ELeave) CDesCArrayFlat(2);

}


How to start incoming call notification:
void CConferenceEngine::StartListening()
{

RPhone::TLineInfo lineInfo;

RLine newLine;
User::LeaveIfError(iPhone.GetLineInfo(n_lines, lineInfo));
User::LeaveIfError(newLine.Open(iPhone, lineInfo.iName));
iLines.Append( newLine );

iLines[n_lines].NotifyIncomingCall(iStatus, iCallName);
iInternalState = EConfCallListening;
SetActive();
}



Creation of the conference call:
TInt CConferenceEngine::CreateConference()
{

TInt err = iConfcall.Open(iPhone);
iConfcall.CreateConference( iStatus );
isConferenceCreated = ETrue;
iInternalState = EConfCallCreated;
SetActive();
return err;
}



How to add a phone call to the conference:
void CConferenceEngine::AddCall(TInt index)
{
iConfcall.AddCall( iStatus, (*iCallNameArray)[index] );
iInternalState = EConfCallAdded;
SetActive();

}

Friday, June 23, 2006

Bluetooth for automotive

Mercedes Benz has released Telephone Module With Bluetooth that:
allows users to operate their Bluetooth (SAP-Profile) compatible phones via their vehicle's multifunction steering wheel, audio system, and central display in the instrument cluster, all without ever taking their phone out of the pocket (or briefcase, purse, etc.). (via textually.org)
I just want to add that sometimes Italians do it...faster :-), in fact:
FIAT and Microsoft launched Blue&Me based on Windows Mobile for Automotive at the 2006 Geneva Motorshow on February. (via Business Week)
Blue&Me has voice command system, which is completely integrated with the steering wheel controls and information display, allows customers who own a Bluetooth® mobile phone to use the phone, without having to take your hands off the wheel.
Thanks to the advanced voice recognition system, it immediately displays and reads incoming SMS messages out loud.

Carnival of the mobilists at m-trends

I'm pleased to announce this week's Carnival of the Mobilist hosted by m-trends.
You'll find as usual interesting articles on mobile society ( and my first contribution, too :-P )

Sunday, June 18, 2006

What do you do with your old phone?

I guess the most frequent response will be: "I abandoned it into a drawer". I will say:"Me too!"

My first mobile phone was a Nokia 5110, monochrome GSM phone just to make calls and messaging; then came Nokia 3330. The personal information stored in that phones where a few so backup and removal data was not a problem.
Then I bought a Series40 phone, Nokia 6610i; I've started using Contacts and Agenda extensively and phone memory let me to store a lots of text messages...but a problem rose up when I've switched to my actual phone Nokia 6630: data transfer!
Even if I'm a Nokia fan, I complained PCSuite so long! The backup format of N6610 was not full compatible with the new phone so the most part of data are still there.

Finally, even if you are part of the little club of persons that did not face problems with data sync, is it worth to keep with you the old phone?

I googled to find opportunities to recycle mobile devices and I've highlighted:
  • an official initiative sponsored by CTIA, but I've noticed that of all member of CTIA just a little part subscribed the recycling iniziative;
  • and some charity organizations which collect phones thanks to donations to fight poverty.
I would like to have a more complete vision, so please comment on this post to describe the recycling opportunities about mobile devices in your country!
I guess that only a little percentage of mobile devices are recycled and in many countries in Europe (and probably in the world) recycling service is still not available.

The number of devices is soaring month by month so it will become necessary to organize recycling to avoid additional environment pollution and waste of materials.

If nothing has happened before is because recycling costs...Should we wait some kind of law that enforces device recycling as did EU (as BBC says) with batteries to make it happens?

Comments are open.....

Friday, June 16, 2006

DVB-H Coverage Map by TIM

Here it is an update of the situation concerning DVB-h coverage in Italy....another carrier has issued its map.
It's a pity that the image could not be enlarged and....pay attention it does NOT describe the actual coverage but how it will be after summer!!

In the same page you could find the list of cities covered by the end of June: Monza, Milano, Pavia, Torino, Roma, Fiumicino, Latina.

I assume a lot of work have to be done during summer to reach the situation of the this map...

Tuesday, June 13, 2006

How to create a launcher for FlashLite movies on Symbian 3rd Edition

I hope the long title is clear enough about what I'm going to discuss :-)

Symbian 3rd edition introduces several changes compared to the previous versions; I'll try to be concise as possible in order to describe the procedure to build a native ( C++ ) application whose only task is to launch the FlashLite player with a specified content.

The prerequisities to build the application are:
  • Symbian 3rd Edition SDK;
  • ActivePerl;
  • Java JRE 1.4.1;
  • Carbide.vs 2.0.1 ( VS.NET Plugin provided by Nokia);
  • Microsoft VS.NET;
The last two items are not mandatory, but at the moment are my preferred IDE ( waiting for Carbide...)

I'll break the discussion into steps:
  1. How to create the skeleton of the launcher using the wizard of VS.NET
  2. How to add/modify icons to the application
  3. How to launch the FlashLite Player with content
  4. How to create the SIS file to install the app.
Let's start!
Step 1:
Launch MS Vs.NET and create a new Symbian Project. Select Symbian 9 as Project type; S60 simple Hello World Application as Project template; S60 3.0 as SDK to build against.
If your SDK is not visible, click on Enable/Disable SDKs button.

The wizard creates a bunch of files.
The .rls file includes the caption strings that are displayed in the Menu aplication of S60 phone:

//d:Caption string for app.
rls_string qtn_hewb_caption_string "launcher"

//d:Short caption string for app.
rls_string qtn_hewb_short_caption_string "launcher"

Step 2:

The application at this moment has a default icon (qgn_menu.svg) in SVG format located in gfx folder.
Symbian 3rd Ed supports vectorial graphics (in addition to bitmap images) to render images to different display resolutions. Remember that S60 devices supporting Symbian 3rd Ed comes with a pletora of resolutions (176*206px; 240*320px; 352*416px); so bitmap icon optimized for a device could appear blocky or strechted in different resolution.

To modify the icons file, right click into the Solution panel the .miflist file and select Edit multiicon definition.

In this example I changed the default with a bmp file, shuttle.bmp.

Here it is the final result:
The procedure to add a svg icon is the same. Remember to replace and not to simply add the new icon because Symbian uses a index-based mechanism to retrieve the resources.

Step 3:

Now it's time to add the code to launch the player....don't be scared, it's just a few lines ;-)
Open <yourapplicationappui.cpp> file (in this case, launcherappui.cpp), and substitute the ConstructL() method with the following one

void ::ConstructL()
{
// Initialise app UI with standard value.
BaseConstructL();

RApaLsSession session;
session.Connect();
TFileName fullpath;


RFs fsSession;
fsSession.Connect();
fsSession.PrivatePath( fullpath );
fullpath.Append(KMyfileName);
fsSession.Close();

TThreadId id;
TInt err = session.StartDocument(fullpath,/* KUidFlash2App ,*/ id);

session.Close();
User::Exit(0);

}

Add this lines to the top of the file:

#include APGCLI.H
#include aknutils.h
_LIT(KMyfileName,"myflashfile.swf");//your swf file name

In the Solution Panel, right click on the solution name; select Properties -> Linker -> Input -> Additional dependecies; add apgrfx.lib to the list of libraries.

The launcher opens Flash player with myflashfile.swf as argument and then close itself.
The swf is located in the private
folder of the launcher, so only the launcher can access to that folder.


(To be continued)
......Next time I'll write how to pack those files into a sis file.


Monday, June 12, 2006

Debug on FlashLite

This is my second post on FlashLite...I'm more and more fascinated by this technology, however I have been stuck for days trying to debug my flashlite application but no way to hit a breakpoint during execution!
Hopefully Alen gave me a great hint...now silent failure are less tricky to face!

Thursday, June 08, 2006

DVB-H Coverage Map by H3G

Some days ago Martin made the point about 3G networks coverage in Europe and he did not found any map about Italy because mobile carriers do not easily provide this kind of information...but something has changed! H3G has just released the coverage map for DVB-H.....ok, it's not about 3G but the important thing is that carriers make simple and clear communication if they want their services become appealing to customers.

For those who do not speak Italian:

  • blue indicates good coverage in urban area;
  • yellow indicates partial coverage in urban area
  • orange indicates poor or lack of coverage in urban area;
  • green indicates good coverage in extra-urban area.