If you are coding using 4.7 or higher you can use AccelerometerSensor.isSupported(). If you are using 4.6 or lower then I don't think there is a way.
---Spends time in #blackberrydev on freenode (IRC)---- Three simple rules: 1. Please use the search bar before making new posts. 2. "Like" posts that you find helpful. 3. If a solution has been found for your post, mark it as solved. --I code too much. Well, too bad.