Series 60 C ++ developers can now write some application software to respond to users turning on or off the phone cover, or changing the orientation of the Mobile Camera. The above two user actions may occur on the Nokia N90 multimedia terminal. This type of software event is supported since Series 60 2nd Edition Feature Pack 2. For example, when a user closes the terminal, the developer can automatically transfer the output to the external screen for display. When the user opens the terminal, the output is automatically transferred to the Internal screen (usually the internal screen is large ).
To add such features to an application, simply add some event processing handles to ceikappui: handlekeyeventl. The corresponding events (teventcode) are eeventscreendevicechanged, eeventcaseopened, and eeventcaseclosed. When the camera is rotated, it is a key event of the eeventkeyup and eeventkeydown types.
The following sample code is used to check the current camera orientation:
# Include <Ecam. h> // link against Ecam. Lib
Ccamera * cam = ccamera: newl (* This, 0 );
Tcamerainfo Info;
Cam-> camerainfo (Info );
Tcameraorientation orientation = info. iorientation;
More information