9

I want to write a native application in c to get the value of orientation in Tizen. The compiled c code must be run on the Tizen phone and I need to get the Value of orientation. The callback function i got from Tizen source is

int app_cb_broker_appcore_rotation_event(enum appcore_rm rm, void *data)
{
    app_device_orientation_cb device_orientation_cb;

    device_orientation_cb = app_context.callbacks->device_orientation;

    if (device_orientation_cb != NULL)
    {
            app_device_orientation_e dev_orientation;

            dev_orientation = app_convert_appcore_rm(rm);

            device_orientation_cb(dev_orientation, app_context.user_data);
    }

    return 0;
}

How to use this function to get the value of current orientation?

1 Answer 1

1

Looking at the header file: https://review.tizen.org/git/?p=framework/appfw/app-core.git;a=blob;f=include/appcore-common.h;hb=HEAD

It looks like you should call appcore_set_rotation_cb to register a callback function to be informed when the rotation changes. If you want to get the existing state you can call appcore_get_rotation_state.

There's some sample code in the API docs included in the header file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.