Have been trying to have this working for a while but i failed.
I have implemented the Sensor Framework in my application to listen to several sensor channels (accelerometer, rotation) and i am getting all working fine except for the multi-tapping.
When i tap the phone from any direction i always get value 3 for the iDirection member of TSensrvTappingData, which is none of the predefined direction constant:
const TUint8 KSensrvAccelerometerDirectionXplus = 0x01;
const TUint8 KSensrvAccelerometerDirectionXminus = 0x02;
const TUint8 KSensrvAccelerometerDirectionYplus = 0x04;
const TUint8 KSensrvAccelerometerDirectionYminus = 0x08;
const TUint8 KSensrvAccelerometerDirectionZplus = 0x10;
const TUint8 KSensrvAccelerometerDirectionZminus = 0x20;
I read on http://wiki.forum.nokia.com/index.php/Category:Sensor that this sensor channel is supported on the 5800 phone.
This is my callback function that received the tapping data from the sensor:
void CTappingDataListener::DataReceived( CSensrvChannel& aChannel,
TInt /*aDataLost*/ )
* 7. Sensor data is received.
* - aChannel parameter tells which channel sent the data.
TSensrvChannelInfo info = aChannel.GetChannelInfo();
if ( info.iChannelType == KSensrvChannelTypeIdAccelerometerDoubleTappingData )
* 8. The data from the channel is received to a package.
* - The data is received through GetData method.
TPckg<TSensrvTappingData> tapPackage( aTapData );
aChannel.GetData( tapPackage );
* As the data is now available for the application the compass can now
* be drawn. The data is forwarded to the draw function.
iSensorEngine->TapData( aTapData.iTimeStamp, aTapData.iDirection );
Has any one experience such a problem?