Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:Camera viewfinder orientation (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Client applications using the Onboard Camera API (CCamera) may have wrong orientation for the viewfinder if there are several clients using the camera consecutively. This happens when a client application that has first initialized the camera is using a different orientation from other client(s).

Article Metadata
Tested with
Devices(s): Nokia N80
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 1 (20 Aug 2007)
Last edited: hamishwillee (15 Jun 2012)

How to reproduce

Start the built-in camera application. The viewfinder will use landscape mode as default. Leave it running in the background and start a 3rd-party camera application in portrait mode, and then start the viewfinder. The viewfinder is still in landscape mode.

Solution

The camera in Nokia N80 and Nokia 3250 is designed to always work in landscape mode. Therefore, by forcing also the 3rd-party camera client to landscape mode, viewfinder orientation will be correct.

void CCameraAppAppUi::ConstructL()
{
BaseConstructL(EAknEnableSkin |
EAppOrientationLandscape);
...

The application can check the device model at startup, and enable landscape mode if MachineUID for Nokia 3250 (0x200005F8) or Nokia N80 (0x200005F9) is detected:

#include <hal.h> // link against hal.lib
TInt machineUid = 0;
HAL::Get(HALData::EMachineUid, machineUid);
This page was last modified on 15 June 2012, at 06:54.
425 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×