Friday, August 31, 2007

Motorola MotoMAGX

Motorola’s MotoMAGX Linux platform is based on three things: an open source Linux operating system, kick ass J2ME support and something they call “WebUI.” [HTTP + CSS + AJAX + WebKit].

Thursday, August 30, 2007

Types of Phones

1. Any mobile phone
-Voice calls

2. Feature phone
-Voice calls
-Colour Display

3. Smartphone
-Voice calls
-Colour Display
-Access to OS
-Application background execution
Compatibility aspects to the S60 platform:

1. Source compatibility: means that the application or a client code can be rebuilt without a need to modify the code.

2. Binary compatibility: means that no rebuild is needed and the application or a client code thus runs on the S60 phone. Potential issues come along when there is a new compiler and tool chain; The S60 3rd Edition introduces new compilation tools (RVCT, GCC EABI), which cause a full binary break.
Symbian Run Modes

Symbian runs in 2 Modes.

1. User mode – kernel services can only be accessed through the EUSER.DLL. The lack of a proper kernel port does not stop the development of user-side components because the platform provides a complete Kernel Port for the PC environment under the Windows Operating System. This is called the emulator.

2 Kernel mode – EUSER.DLL is an interface between common code and hardware-specific code. In the other words, kernel mode means that the software is run on the target hardware.
S60 ecosystem.
1. Licensees.
2. Product Creation Community (PCC)
• Boutiques – experts in designing complete S60 phones and managing entire S60 phone projects
• Competence Centers – top-tier software companies with deep S60 end-to-end understanding and extensive S60 project support
• Wireless Technology Providers – experts on the hardware platforms or hardware components upon which S60 phones are built
• Contractors – skilled software companies offering focused expertise in specific technology areas
3. 3rd party developers.
S60 architecture

S60 architecture consists of ...
1. Cellular modem controlled by modem software.
2. Domestic Operating System (DOS).
3. Application processor engine controlled by Symbian OS.
4. S60 software.

Nokia’s Mobile Software (MSW) is the organization behind the S60 platform.

Monday, August 13, 2007

Coding for Mobile on Mobile

If you are thinking to do this Hmmmm. you need some rest. ;-)
Do what i do use

Saturday, August 11, 2007

How to use TLex to Parse tokens from String.


TLex8 lex(KSomeConstString);
TChar ch;
TBuf8<50> token;

while((ch = lex.Get()) != 0 )
while ((ch = lex.Peek()) != ',')

Now we have the string in token,
do something..

Friday, August 10, 2007

"C++/C Development with Eclipse" Then and Now

In the Past i have tried to use Eclipse for my day to day development, But at that time it too me around 6 hours before i could install all the req. tools and started my developmentBut that is also not a smooth road.

But Now {2 day} i found a good Eclipse CDT bundle for Windows with that i start and running in 30 mins. I suggest you take a look in to it.
LiMo [Linux Mobile] Platform architecture
How to hide Status Pane

CEikonEnv* iEnv = CEikonEnv::Static();
CEikStatusPane* statusPane=Env->AppUiFactory()->StatusPane();
Include files:
#include <eikspane.h>
#include <eikenv.h>

Link against: eikcore.lib

Tuesday, August 07, 2007

Sending Application in Background using RSS

Add the "Launch" field in application info resource in your Project .RSS file
hidden = KAppIsHidden;
embeddability = KAppNotEmbeddable;
newfile = KAppDoesNotSupportNewFile;
// Launches the application in background.
launch =KAppLaunchInBackground;

Why we require to launch a application in Background ?
One use case may be the running wallpaper where a server with GUI runs in BackGround.

Sunday, August 05, 2007

Java Verified Signing Flow.
How to get the Resource File from Installation
TFileName myCompleteFileName(KIconFile());
Symbian Symbianed Flow For Symbian V9

Capability Mobile Diagarm For Symbian v9
The "capabilities" model was introduced in Symbian OS v9.x (S60 3rd Edition onwards). There are 20 capabilities, which are divided into four groups:

Symbian V9 Security Description.

A capability is an access token that corresponds to an access permission of sensitive system resources.

Basic capabilities

Grants access to "short-link" connections such as Bluetooth and infrared. These connections are not billable transactions. An example of this kind of action is device-to-device file transfer.

Grants access to the location of the device, such as network cell ID.

Grants access to remote service and might involve cost for the user. Typical use cases are dialing a normal GSM voice call or sending a text message.

Grants read-only access to confidential user data. Typical use cases are reading contacts, messages, and calendar events.

Grants write access to user data. Typical use cases are adding or deleting contacts, messages, or calendar events.

Grants access to live confidential information about the user and his/her immediate environment. An example of a typical protected resource in a mobile device is a camera.

Extended capabilities

Grants access to kill any process running in the system or completely turn off the device.

Grants the right to a server to register with the protected name. Protected names start with a “!”. The kernel will prevent servers without ProtServ capability from using such a name and therefore will prevent protected servers from being impersonated.

Grants read-only access to sensitive system data such as device settings.

Grants write access to sensitive system data such as device lock settings, system time, and time zone.

Grants access to logical device drivers that provide input information about the surroundings of the mobile phone, for example global positioning system (GPS) device drivers.

Grants access to simulate key presses and capture such events from any application. Typical example is a screen-shot application.

Grants access to create a trusted UI session and display dialogs in a secure UI environment. Typical example is password dialog.

Platform-approved capabilities

Grants read-only access to all data caged directories and write access to /private –directory. NOTE! AllFiles will not be granted for a filemanager type of application.

Grants access to communication device drivers such as WiFi, USB, and serial device drivers.

Grants access to disk administration functions such as formatting a drive or mounting/unmounting drive partitions.

Grants access to critical multimedia device drivers such as camera and sound.

Grants access to modify or access network protocol controls such as dropping all connections from the mobile phone.

Manufacturer-approved capabilities

DRM (digital rights management)
Grants access to DRM-protected content in plain form.

Grants write access to /sys and /resource directories in the mobile phone.
Using FlashLite with Symbian C++

Code for S60 V3:

void CSWF2SISAppUi::LaunchSwfL( const TDesC &aFlashAppName )
iHandler = CDocumentHandler::NewL( NULL );

TUid KUidFlash21 = { 0x200077D6 };
TDataType dtype(KUidFlash21);

TInt error = iHandler->OpenFileEmbeddedL( aFlashAppName, dtype );

void CSWF2SISAppUi::HandleServerAppExit (TInt /* aReason */)

Code for S60 FP1:

void CSWF2SISAppUi::LaunchSwfL( const TDesC &aFlashAppName )
iHandler = CDocumentHandler::NewL( NULL );

TUid KUidFlash21 = { 0x200077D6 };
TDataType dtype(KUidFlash21);

TInt error = iHandler->OpenFileEmbeddedL( aFlashAppName, dtype );

void CSWF2SISAppUi::NotifyExit (TExitMode aMode)

Get Phone Screen Size
Header:  w32std.h
Library: ws32.lib

TPixelsAndRotation ScreenSize;
TInt width = ScreenSize.iPixelSize.iWidth;
TInt height = ScreenSize.iPixelSize.iHeight;

iLogger.WriteFormat(_L("Width : %d, Heigth : %d"), width, height);
Find out all the Message server entries.

CMsvEntry *inbox=iSession->GetEntryL(KMsvGlobalInBoxIndexEntryId);
CMsvEntrySelection *children=inbox->ChildrenWithMtmL(KUidMsgTypeSMS); // KUidMsgTypeMultimedia
for(TInt i=0;i<children->Count();i++)
CMsvEntry *child=inbox->ChildEntryL((*children)[i]);
const TMsvEntry &entry=child->Entry();
A color picker in Symbian S60 v3

TBool noneExist = EFalse;
TBool noneChosen = EFalse;
TRgb colour = KRgbDarkGray;

CArrayFixFlat<TRgb>* colours = new(ELeave) CArrayFixFlat<TRgb>(6);

CAknColourSelectionGrid *d = CAknColourSelectionGrid::NewL( colours, noneExist, noneChosen, colour);
///Here you get the selected color..this you can use in your draw method.
//selectedColor = colour;


Saturday, August 04, 2007

How to Hide Application from User Menu
In your ApplicationName_reg.rss file you will find a structure RESOURCE APP_REGISTRATION_INFO, you need to add the following line, to the resource.
BYTE hidden = KAppIsHidden;
This application will be a hidden application, and it will not be shown in Applications list.
Mobile DRM

Several articles I read recently on Mobile DRM:

Roberto Nunes’s Forum Nokia Blog:
DRM and some more TLA (tree letters abbreviations)
DRMs - Part 2
DRMs - Part 3 OMA DRM
DRMs - Part 4 - Conclusions
Microsoft Zune’s Big Innovation: Viral DRM
MS defends Zune temporary DRM

Friday, August 03, 2007

How to detect if an application is launched by user or the startup list

It is sometimes useful to be able to detect whether an application is started at boot time by the Startup List API (present only in S60 3rd Edition) or by the user, and passing Symbian Signed - which is generally required to have an application which requires auto boot feature - makes this almost mandatory. So How we can archive it let us try

First, we will modify the application registration file and add some opaque_data field in the APP_REGISTRATION_INFO resource. The content and value of these data does not really matter, you just need to specify something: :

#include <appinfo.rh>
#include <uikon.rh>

opaque_data = r_startup_detect;

RESOURCE NUMBER_INT8 r_startup_detect
value = 1;

The opaque_data and other launch parameters will be ignored by the startup list when launching the application. Thus, detecting whether they are present or not allows to differentiate whether the application has been launched at boot time or by the user.

To do this, we will override the ProcessCommandParametersL() function in your AppUI:

TBool CMyAppUi::ProcessCommandParametersL( CApaCommandLine &aCommandLine )
if(aCommandLine.OpaqueData().Length() > 0)
// Opaque data exists,
// app. has been manually started from the menu
// Opaque data not present,
// App. has been auto-started from start up
// or after Installation !!!
return CEikAppUi::ProcessCommandParametersL( aCommandLine );

Thursday, August 02, 2007

How to launch an application with its UID

LaunchAppWithUIDL(const TUid aAppUid)
RApaLsSession apaLsSession;

TApaAppInfo appInfo;
TInt retVal = apaLsSession.GetAppInfo(appInfo, aAppUid);

if(retVal == KErrNone)
CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
//cmdLine->SetLibraryNameL(appInfo.iFullName); // Pre Symbian V9
User::LeaveIfError( apaLsSession.StartApp(*cmdLine) );

// Application with UID can't be found!


stats counter