View Single Post
anidel's Avatar
Posts: 1,743 | Thanked: 1,231 times | Joined on Jul 2006 @ Twickenham, UK
#176
Solved thanks to maemo-developers.
I had to first start the accelerometer:

Code:
  if (osso_rpc_run_system(ctx, MCE_SERVICE, MCE_REQUEST_PATH,
          MCE_REQUEST_IF, MCE_ACCELEROMETER_ENABLE_REQ, NULL, DBUS_TYPE_INVALID) == OSSO_OK) {
        g_printerr("INFO: Accelerometers enabled\n");
  } else {
        g_printerr("WARN: Cannot enable accelerometers\n");
  }
and then stop them when leaving Xournal:

Code:
  if (osso_rpc_run_system(ctx, MCE_SERVICE, MCE_REQUEST_PATH,
          MCE_REQUEST_IF, MCE_ACCELEROMETER_DISABLE_REQ, NULL, DBUS_TYPE_INVALID) == OSSO_OK) {
        g_printerr("INFO: Accelerometers disabled\n");
  } else {
        g_printerr("WARN: Cannot disable accelerometers\n");
  }
 

The Following 3 Users Say Thank You to anidel For This Useful Post: