×
Namespaces

Variants
Actions
Revision as of 09:54, 15 June 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Camera viewfinder orientation (Known Issue)

From Nokia Developer 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 09:54.
97 page views in the last 30 days.
×