Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
Posts: 9
Registered: ‎01-05-2011
My Device: Not Specified
Accepted Solution

testing accelerometer

Is there a way to test in the simulater how it would act with the accelerometer?

 

The only way I can think is to create a rectangle and use the mouse click/drag.

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: testing accelerometer

hey daniel,

 

there currently is no way to test for the accelorometer at this time. hopefully it will be available in the next release. hope that clears things up. good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: testing accelerometer

You can create "driver" code to simulate accelerometer events.  I did this for the geo location.  You create a class with an array of data that you want to send to the instantiated attribute for listening to accelerometer events.  In the class you define a timer event (fixed or random) to read the next element in the array, create the appropriate accelerometer event and dispatch to the attribute awaiting for those events.  When you get to the end of the array, start over.

 

You could also randomize what gets sent to the accelerometer listener.

 

In my app, I have a checkbox to start and stop this driver.  Production mode, I hide the checkbox so it would not get run by the user.