You really want to access this class:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=include/ui/Camera.h;h=e593feab7899aa29c1c0267fb369b8d3ec2644e9;hb=8ecb36eec61f119f500a805b82438aadb3396a19
It's not supported officially but you might be able to get it to work
by copying that header (and dependent headers) to your app and somehow
linking with the necessary library. It's going to be complicated.
This is a little extreme. You are not -guaranteeing- anything. You are simply running the risk of breakage. An unstable API isn't something that will DEFINITELY change. Only something that can't be guaranteed to remain the same. Look up the meaning of the unstable someday.
Unless, of course, you know exactly what's going to change and when. In which case, publicizing that would be of enormous benefit to the community.
And I don't recall seeing anyone asking for you to "spend time trying to keep them running". As developers, we generally have a good understanding that when we are doing something unofficial or NOT SUPPORTED, there is a risk of breakage. But, for what we need, it works right now, and we'll fix it later as needed.
I don't mean to be rude or offensive here, but sometimes it comes across that android is YOUR playground, and you only let us, the developers, play so long as you like us. And as soon as you don't, you take your toys and go home. But without us, your playground would be a weed choked lot somewhere.
I think people are just frustrated that the stable APIs are so limited
at the moment. They basically don't let you do anything you couldn't
do without them:
* libc (C library) headers
* libm (math library) headers
* JNI interface headers
* libz (Zlib compression) headers
* liblog (Android logging) header
* A Minimal set of headers for C++ support
Not exactly thrilling stuff! Everyone will be much happier when you
can access phone hardware from native code. These would be my
priorities (in order):
OpenGL
Button & touchscreen input (btw is it going to support multi-touch?)
Camera input
Audio output
Accelerometer & compass.
That's pretty much everything.
Really? Even compared to interpreted Java? Sounds dubious.
> That being said, I think several people are working to make ports of
> STL available. Very few people care about RTTI (at least, we've never
> heard anyone make a strong case for why it's needed or useful.).
I've used dynamic_cast<> in the past. Occasionally it is useful or unavoidable.
Rubbish.
Well exceptions aren't that commonly used and RTTI is pretty rare, but
nearly all C++ programs use some kind of templated container or string
class (std::string, QList, CString, etc.)
This is now really off-topic.
If you aren't making use of templates, at least, you aren't using the
features of C++ that differentiate it from C. And if you aren't using
exceptions, you aren't writing fault-tolerant code. And given the
nature of computers, fault tolerance is rather...important.