×
Namespaces

Variants
Actions
Revision as of 09:49, 7 September 2012 by hamishwillee (Talk | contribs)

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

Archived:Some user-defined vibra intensity values are not supported on S60 3rd Edition (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}}.

Article Metadata
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 1 (31 Aug 2007)
Last edited: hamishwillee (07 Sep 2012)

Description

The HWRM Vibra API, defined in hwrmvibra.h, provides the ability to control the device vibration feature. The following function:

void CHWRMVibra::StartVibraL( TInt aDuration, TInt aIntensity );

allows setting a custom intensity for the vibration. aIntensity is defined as percentage of the maximum rotation speed of the vibra motor. Negative values are also allowed, in which case the vibra motor rotates in the opposite direction. According to SDK documentation, the allowed value range for aIntensity is -100..100. Intensity values outside this range will result in KErrArgument error.

In addition, vibra hardware places also a lower limit for the rotation speed. This low limit is in most devices 30; trying to set an intensity lower than +/- 30 will result in KErrGeneral error.

Solution

User-defined intensity values should be in the range (+/-) 30..100. Vibra clients should be prepared to handle following error (leave) codes when using the above function:

  • KErrNotSupported - Device does not support user-defined vibra intensity values.
  • KErrArgument - One of the parameters is out of range.
  • KErrAccessDenied - Vibration setting in the user profile is not set.
  • KErrBadHandle - Vibra session has been invalidated.
  • KErrLocked - Vibra is locked down because too much continuous use or explicitly blocked (e.g. by a vibration-sensitive accessory).
  • KErrTimedOut - Timeout occurred in controlling vibra.
  • KErrInUse - Vibra is reserved by some other client.
  • KErrNoMemory - Memory allocation failure.
  • KErrGeneral - Vibra hardware does not support one of the parameters, or other hardware error.
This page was last modified on 7 September 2012, at 09:49.
68 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.

×