Getting Input on Bada

This topic contains 3 replies, has 2 voices, and was last updated by  Scott 7 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30233

    phred
    Member

    Just got the SDK for the Bada and the big question is, what exactly is the best way to receive touch and accelerometer events?

    I see this info in the PVRShellApp class but there doesn’t seem to be a direct way from the PVRShell class (from which our app is derived from) to get access to said data.

    Any insight!?

    Fred

    #34178

    Scott
    Moderator

    Hi,

     

    You can use

     

    float *pfTouch = (float*) PVRShellGet(prefPointerLocation);

     

    to get a pointer to the co-ordinates of a single touch. If the returned pointer is NULL then currently nothing is touching the screen. If you require multiple touches then you’ll need to extend the PVRShell to support this.

     

    As for the accelerometer events this is not currently supported by the bada version of the PVRShell and may be something we add to a future release. If you would like to extend the Shell to support the accelerator then it seems ExamplesUIApplicationsrcSensorManagerExample.cpp from Samsung’s bada SDK offers an example of how to access the relevant data using bada.

     

    Thanks,

     

    Scott
    #34179

    phred
    Member

    Hey Scott!

    Thanks for the reply but I ended figuring that one out after digging around. Perhaps you guys could make it much clearer as how to use the PVRShellGet functions and specifically what to type cast the returned pointers as.

    I figured out how to get the accelerometer to work as well.

    While I have you here, is it possible to re-work the whole PVRShell system with the given C++/H files or is there stuff tucked away in a lib that can’t be modified?

    #34180

    Scott
    Moderator
    phred wrote:
    While I have you here, is it possible to re-work the whole PVRShell system with the given C++/H files or is there stuff tucked away in a lib that can’t be modified?

     

    The Shell folder in the SDK contains all the source code for the PVRShell so there shouldn’t by any problems re-working it to fit your needs.

     

    phred wrote:
    Perhaps you guys could make it much clearer as how to use the PVRShellGet functions and specifically what to type cast the returned pointers as.

    I must admit some of the comments in the code are a little vague with regard to what is returned. We’ll have a look at improving them for a future release.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.