I'm looking for approaches for setting display orientation through configuration, rather than through sensors. I've seen other postings on this subject in various forums, but the responses vary greatly, and often warn about unforeseen consequences for following the advice. Some of this may be due to Android's evolving orientation implementation over time. But, some of it may be also due to Android not originally anticipating this need for immobile, sensorless, devices.
Here's our need:
- We're building a new Android Gingerbread 2.3.4 tablet, with hardware similar to the AM3517 EVM.
- The tablet will be permanently mounted in various orientations.
- The tablet has no orientation sensors. Instead, the customer configures the orientation, resulting in a stored orientation property retrievable by firmware.
- The firmware reads the orientation property only during system initialization, so its value will not change while Android is running.
- The orientation must apply to the whole system, not individual apps. All apps adhere to the configured orientation, and an individual app should be oblivious to our implementation. The app should adjust to the orientation exactly as it would if the orientation was set by sensors, which in our case will not change further once system initialization has completed.
The question is, what do we do software-wise to make this happen?. We want a solution that is robust, with no (or at least minimal) chances of unforeseen side effects. If that means we should emulate a sensor at the lowest level, then that's what we'll do. But, we would hope to work above that layer, perhaps at the HAL layer, and preferably in Java rather than C.
Thanks,
Ron