- July 31, 2010 at 5:07 am #30233
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.
FredAugust 2, 2010 at 5:41 pm #34178
Hi,You can usefloat *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,ScottAugust 2, 2010 at 7:58 pm #34179
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?August 3, 2010 at 10:18 am #34180
ScottModeratorphred 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.