Hi,
I'm writing a map-app and want to be able to read north direction to rotate the map as a user changes direction.
Using jni I managed to get hold of the sensorManagerObject but got stucked when trying to retrieve methodId for defaultSensor needed to get magnetometer.
Is there some way to get a list of methods and methodId:s via jni?
EDIT:
Documentation for SensorManager is like:
public Sensor getDefaultSensor (int type) and
the sensorManagerClass is retrieved OK through:
sensorManagerClass := javaEnvRef^^.FindClass(javaEnvRef, 'android/hardware/SensorManager');To my understanding that would indicate a call like following to retrieve methodId:
javaMethodId_getDefaultSensor :=
javaEnvRef^^.GetMethodID(javaEnvRef, sensorManagerClass, 'getDefaultSensor', '(I)Landroid/hardware/SensorManager;');Making a call with that code gives: javaMethodId_getDefaultSensor = nil
Could someone give a clue to whats is wrong?
Regards
stab