Namespaces
Variants
Actions

Archived:Camera viewfinder orientation (Known Issue)

Jump to: navigation, search
Archived.png
Archived: 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

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 09:54.
153 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved